bugKawa - Bugs: bug #47863, InternalError in compilation...

 
 

bug #47863: InternalError in compilation seemingly related to if (int)

Submitted by:  Nathan S. <nathans>
Submitted on:  Thu 05 May 2016 10:43:57 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 06 May 2016 06:00:52 AM UTC, comment #1:

I checked in a fix for this.

The reason that it only failed when ::int was specified was that in that case the compiler could deduce that (if x ...) is always true. I.e. the if is redundant - which is the reason this compiled bug wasn't caught before.

The reason the (set! x ...) was needed to trigger the bug was that otherwise the compiler could and did constant-fold (if x A B) to A.

The two optimizations mentioned above are done at different phases in the compiler (though probably shouldn't be), hence different effect.

I also checked in your testcase. However, I tweaked so it also tests that 0 is true.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 05 May 2016 10:43:57 PM UTC, original submission:

The compiler throws an InternalError when trying to compile this procedure:

If I do not enclose the if-statement with a try-finally clause there is no exception. If I remove the ::int typehint there is no exception. If I remove the set! statement there is no exception.

Nathan S. <nathans>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #37086:  fail.scm added by nathans (187B - application/vnd.lotus-screencam - file that will not compile)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by nathans (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 01 Jun 2016 02:48:45 PM UTCbothnerOpen/ClosedOpen=>Closed
    Fri 06 May 2016 06:00:52 AM UTCbothnerStatusNone=>Fixed
      Assigned toNone=>bothner
    Thu 05 May 2016 10:43:57 PM UTCnathansAttached File-=>Added fail.scm, #37086

    Back to the top


    Powered by Savane 3.1-cleanup1