Bug 19119 - [3.4 regression] -msse -O2 causes ICE
Summary: [3.4 regression] -msse -O2 causes ICE
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: 3.4.4
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-12-21 21:34 UTC by H.J. Lu
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 4.0.0
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2004-12-21 21:34:22 UTC
With gcc 3.4 checkout at Tue Dec 21 21:01:51 UTC 2004, I got

[hjl@gnu-1 tmp]$ cat foo.c
struct big { char c[4 * 1024]; };
struct big *array;
struct big *array_end;
int
main (int argc, char **argv)
{
  unsigned int i;
  unsigned int array_members = argv[1] ? atoi (argv[1]) : 50;
  array = (struct big *) malloc (array_members * sizeof *array);
  array_end = array + array_members;
  for (i = 0; i < array_members; i++)
    array[i].c[0] = i % 128;
  return 0;
}
[hjl@gnu-1 tmp]$ /usr/gcc-3.4/bin/gcc -S -O2 -msse foo.c
foo.c: In function `main':
foo.c:14: error: insn does not satisfy its constraints:
(insn 141 57 60 2 (set (reg/f:SI 21 xmm0 [orig:93 array ] [93])
        (reg:SI 0 ax)) 36 {*movsi_1} (nil)
    (nil))
foo.c:14: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:391
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Volker Reichelt 2004-12-23 17:11:33 UTC
Fixed by Richard's patch for PR19102:
http://gcc.gnu.org/ml/gcc-cvs/2004-12/msg00917.html

Btw, I needed to add -march=i686 to the command line to trigger the bug.