Bug 181586 - ICE when compiling sxemacs
Summary: ICE when compiling sxemacs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-15 00:08 UTC by Ville Skyttä
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.1.0-0.29
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-20 18:26:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
preprocessed source (510.18 KB, text/plain)
2006-02-15 00:08 UTC, Ville Skyttä
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 26300 0 None None None Never

Description Ville Skyttä 2006-02-15 00:08:08 UTC
gcc-4.1.0-0.25 on x86_64 produces an ICE when compiling sxemacs.  Reproducer:

$ wget http://ftp.sxemacs.org/pub/sxemacs/sxemacs-22.1.3.tar.gz
$ tar zxf sxemacs-22.1.3.tar.gz
$ cd sxemacs-22.1.3
$ ./configure ; make
[...]
gcc -c -Wall -Wno-switch -Wmissing-prototypes -Wsign-compare
-Wno-char-subscripts -Wundef -Wstrict-prototypes -Wpacked -Wshadow
-Wmissing-declarations -g -O3  -Demacs -I. -DHAVE_CONFIG_H -I/usr/local/include
glyphs.c
glyphs.c: In function 'make_image_instance_1':
glyphs.c:1448: internal compiler error: in trunc_int_for_mode, at explow.c:54
[...]

Comment 1 Ville Skyttä 2006-02-15 00:08:09 UTC
Created attachment 124658 [details]
preprocessed source

Comment 2 Jakub Jelinek 2006-02-15 08:55:56 UTC
Simplified testcase:

extern void fn1 (long int) __attribute__ ((noreturn));
void fn2 (long int);
extern long int u, v;
struct S
{
  char c;
  long int d;
  long int e;
};

static inline struct S *
fn3 (long int x)
{
  if (*(char *) x != 6)
    fn1 (0);
  return (struct S *) x;
}

static inline int
fn4 (long int x)
{
  if (x == u)
    return 3;
  fn2 (x);
  return 0;
}

int
test (long int x)
{
  long int r;
  int m = 0;

  for (r = x; r != v; r = (fn3 (r)->d))
    if (*(char *) r != 6)
      fn1 (x);
    else
      m |= 1 << (fn4 (fn3 (r)->e) - 1);
  return m;
}



Note You need to log in before you can comment on or make changes to this bug.