On Fri, Apr 14, 2017 at 10:27:45PM +0100, Gavin Smith wrote: > Line 21273 is > subl $4294967296,%eax > > Line 21294 is > subl $4294967296,%eax > > > the problem occurs. I believe that the faulty code is coming from the > use of INT_ADD_WRAPV from intprops.h. I haven't investigated how exactly > this macro leads to the faulty code.
The macro expands to a lot of code, but I simplified the code that gives the same error: $ cat tmp.c int main (void) { int length1 = 0, length2 = 0; if ( ( int ) ( ( ( unsigned int ) ( length1 ) + ( unsigned int ) ( length2 ) ) - ( ( - 2147483647 - 1 ) ) ) + ( ( - 2147483647 - 1 ) ) ) 1; } $ /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. -D_REENTRANT tmp.c Assembler: "/tmp/yabeAAAUsaiac", line 23 : Value out of range Failure in /opt/solarisstudio12.3/prod/bin/fbe, status = 0x7f00 Fatal Error exec'ing /opt/solarisstudio12.3/prod/bin/fbe c99: acomp failed for tmp.c The same subl $4294967296,%eax line occurs in the assembly output. Can this be fixed in intprops.h?