Bug 32307 - ICE building simple httpd log.c for -m5282x option
Summary: ICE building simple httpd log.c for -m5282x option
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.3.4
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-12 15:16 UTC by Joel Sherrill
Modified: 2009-08-23 18:43 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: m68k-rtems4.8
Build: i686-pc-linux-gnu
Known to work:
Known to fail: 3.2.3 4.1.1 4.2.0 4.2.1
Last reconfirmed:


Attachments
preprocessed code to generate problem (22.79 KB, application/x-bzip2)
2007-06-12 15:17 UTC, Joel Sherrill
Details
alternate version of bug file which has if 0 around offensive code (22.85 KB, application/x-bzip2)
2007-06-12 15:39 UTC, Joel Sherrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2007-06-12 15:16:21 UTC
The full command line is below.  It appears to be triggered by -m528x and is indepdendent of selected optimization level.

m68k-rtems4.8-gcc --pipe -DHAVE_CONFIG_H   -I.. -I../../cpukit/../../../uC5282/lib/include -DHAVE_MD5  -Wall -fasm -m528x -O2 -g -MT libshttpd_a-log.o -MD -MP -MF .deps/libshttpd_a-log.Tpo -c -o libshttpd_a-log.o `test -f 'log.c' || echo '../../../../../../current/c/src/../../cpukit/shttpd/'`log.c
../../../../../../current/c/src/../../cpukit/shttpd/log.c: In function 'log_access':
../../../../../../current/c/src/../../cpukit/shttpd/log.c:111: error: insn does not satisfy its constraints:
(insn 74 158 159 10 ../../../../../../current/c/src/../../cpukit/shttpd/log.c:90 (set (mem/c:SI (plus:SI (reg/f:SI 14 %a6)
                (reg:SI 1 %d1)) [57 D.6863+0 S4 A16])
        (mem/s:SI (plus:SI (reg/v/f:SI 10 %a2 [orig:48 c ] [48])
                (const_int 220 [0xdc])) [22 <variable>.loc.io.total+0 S4 A16])) 34 {*movsi_cf} (nil)
    (nil))
../../../../../../current/c/src/../../cpukit/shttpd/log.c:111: internal compiler error: in reload_cse_simplify_operands, at postreload.c:393
Please submit a full bug report,
Comment 1 Joel Sherrill 2007-06-12 15:17:46 UTC
Created attachment 13689 [details]
preprocessed code to generate problem

The following should reproduce the error:

m68k-rtems4.8-gcc -m528x  -c log_preprocessed.c

I believe this should occur on any m68k target.
Comment 2 Joel Sherrill 2007-06-12 15:21:26 UTC
Tested using RTEMS cross RPMs for RTEMS 4.6 (gcc 3.2.3) and RTEMS 4.7 (gcc 4.1.1).
Comment 3 Joel Sherrill 2007-06-12 15:39:43 UTC
Created attachment 13690 [details]
alternate version of bug file which has if 0 around offensive code

I hacked on the file that tripped the bug and now have this one which has if 0's around the offensive code.  It appears to have offensive sections.

+ an inline conditional
+ two calls to my_snprintf.
Comment 4 Ralf Corsepius 2007-07-30 08:11:38 UTC
Having investigated this breakdown further, I can reproduce it for many coldfire variants.

Also: FWIW: Adding -fomit-frame-pointer lets the ICE disappear.
Comment 5 Andreas Schwab 2009-08-23 18:43:41 UTC
No longer reproducible with 4.3.4, assuming fixed.