Bug 38159 - [avr] ICE: gcc.c-torture/execute/pr38051.c compilation, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions
Summary: [avr] ICE: gcc.c-torture/execute/pr38051.c compilation, -O3 -fomit-frame-poi...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-11-16 17:20 UTC by Eric Weddington
Modified: 2011-07-14 17:28 UTC (History)
3 users (show)

See Also:
Host:
Target: avr-*-*
Build:
Known to work: 4.6.2
Known to fail: 4.4.0, 4.7.0
Last reconfirmed: 2011-07-14 17:15:35


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Weddington 2008-11-16 17:20:12 UTC
ICE on AVR target: gcc.c-torture/execute/pr38051.c compilation,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions

Executing on host: /usr/local/avrdev/gcc/build/gcc/xgcc -B/usr/local/avrdev/gcc/build/gcc/ /usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c  -w  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  -DSTACK_SIZE=2048 -DNO_TRAMPOLINES  -DSIGNAL_SUPPRESS -mmcu=atmega128  /root/dejagnuboards/exit.c -Wl,-u,vfprintf -lprintf_flt -Wl,-Tbss=0x802000,--defsym=__heap_end=0x80ffff  -lm   -o /usr/local/avrdev/gcc/build/gcc/testsuite/gcc/pr38051.x5    (timeout = 300)
/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c: In function 'mymemcmp':

/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c:189: error: unable to find a register to spill in class 'POINTER_REGS'

/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c:189: error: this is the insn:

(insn 371 370 372 10 /usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c:63 (set (reg/v:SI 397 [ a0 ])

        (mem:SI (subreg:HI (reg/v:SI 413 [ srcp1 ]) 0) [2 S4 A8])) 12 {*movsi} (nil))

/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/pr38051.c:189: internal compiler error: in spill_failure, at reload1.c:2093

Note that  test is successful with:
PASS: gcc.c-torture/execute/pr38051.c execution,  -O3 -fomit-frame-pointer -funroll-loops 

The only difference is the flag -finline-functions, which seems to trigger the bug.
Comment 1 Richard Biener 2008-11-16 22:26:24 UTC
What's sizeof (void *) and sizeof (long) for avr?
Comment 2 Eric Weddington 2008-11-17 00:15:02 UTC
(In reply to comment #1)
> What's sizeof (void *) and sizeof (long) for avr?
> 

char: 8-bit
int/short: 16-bit
pointer: 16-bit
long: 32-bit
long long: 64-bit
Comment 3 Eric Weddington 2011-07-14 17:15:35 UTC
Odd, this does not show up as a failure in latest 4.6.2 test results:
http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg01528.html

But, it does show up as a failure in the latest 4.7.0 test results:
http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg01530.html

There it fails for -O[23s] (plus various flags). The error is triggered even if -finline-functions is not specified.
Comment 4 Georg-Johann Lay 2011-07-14 17:28:07 UTC
Must be new artifact, 

r176217 fails and my local 176136 passes.