Euphoria Ticket #881: Translation fails: bit ops, division, sequence initialization

Two tiny programs.

The first:

function foo(integer x) 
    return and_bits(floor(x/{#40,#08,#1}), #7) 
end function 
 
constant b = #AA 
 
sequence s0 = foo(b) 

The second:

function foo(integer x) 
    return and_bits(x, {#C0,#38,#7})/{#40,#08,#1} 
end function 
 
constant b = #AA 
 
sequence s0 = foo(b) 

Both programs are failed to be translated. The translator just outputs something like `Build directory: build-335365\` and then silently closes itself. Also it emits two empty .c files in that directory.

Command line:

euc -gcc -con -keep test.exw 

Euphoria version:

Euphoria Interpreter v4.0.5 
   Windows, Using Managed Memory 
   Revision Date: 2012-10-11, Id: 362497032f33 

Platform: WinNT, Build: WinXP, Service Pack 3:2

Details

Type: Bug Report Severity: Blocking Category: Translator
Assigned To: SDPringle Status: Fixed Reported Release: 4.0.5
Fixed in SVN #: View VCS: none Milestone:

1. Comment by SDPringle Dec 25, 2014

Also reproducible on Linux/32 and Euphoria 4.1AL

2. Comment by SDPringle Dec 25, 2014

If you are coming across this in production code try the line

without inline 

at the top of the file.

3. Comment by SDPringle Jan 18, 2015

Okay, I have a fix for this. Just a day or two from now, I'll send it out.

4. Comment by SDPringle Jan 19, 2015

See: hg:euphoria/rev/0eab82122600

changeset: 6277:0eab82122600 branch: 4.0 parent: 6275:ca3677d14daf user: Shawn Pringle <shawn.pringle@gmail.com> date: Mon Jan 19 00:48:14 2015 -0300 files: docs/release/4.0.6.txt source/emit.e source/global.e tests/t_881-1.e tests/t_881-2.e description:

  • fixes ticket 881: In frontend, update previous op cache when assignment gets optimized out.

5. Comment by SDPringle May 22, 2015

See: hg:euphoria/rev/81024d5e709f

changeset: 6332:81024d5e709f branch: 4.0 user: Shawn Pringle <shawn.pringle@gmail.com> date: Mon May 18 08:23:53 2015 -0300 files: tests/t_881-1.e description:

  • added a test for ticket 881

Search



Quick Links

User menu

Not signed in.

Misc Menu