This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] fix spec2k perl miscompilation [patch]


253.perlbmk in spec2k contains (or used to contain, because i can't
reproduce it with my copy of spec2k) expression-statements like this:

void XS_UNIVERSAL_isa()
{
  long ax;
  (void)( { PL_stack_sp = PL_stack_base + ax + ((1) - 1); return; } );
}

I seem to remember a thread where the consensus was that this is
invalid.  Mainline GCC handles it but it causes the gimplifier to ICE.

The attached patch fixes the ICE, adds a warning and adds a new test
case to test for the warning and that we generate the expected code. 
This should fix Qiong's SPEC failure.

Jason suggested that the warning should go in the FE, but I need a
couple of pointers as I have no idea where I would be getting this in.

Jason, does this look OK?


Thanks.  Diego.

Attachment: 20030612-no-return-in-stmt-expr.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]