Bug 6597 - [3.3/3.4 regression] ICE in set_mem_alias_set compiling Qt with -O2 on ia64
Summary: [3.3/3.4 regression] ICE in set_mem_alias_set compiling Qt with -O2 on ia64
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: 3.3.1
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Reported: 2002-05-07 10:56 UTC by janis187
Modified: 2004-01-17 04:22 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:

moc_qwidget.ii.gz (46.24 KB, application/x-gzip )
2003-05-21 15:17 UTC, janis187

Note You need to log in before you can comment on or make changes to this bug.
Description janis187 2002-05-07 10:56:01 UTC
Building Qt on ia64-unknown-linux-gnu with the current CVS
fails with the following ICE:

/home/build/gcc_mainline/ia64/install/bin/g++ -c \
  [includes and defines] \
  -pipe -O2 -fPIC \
  -o kernel/moc_qwidget.o kernel/moc_qwidget.cpp
kernel/moc_qwidget.cpp: In static member function `static QMetaObject*
kernel/moc_qwidget.cpp:1016: Internal compiler error in set_mem_alias_set, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Output for -v for this compiler: 

Reading specs from /home/build/gcc_mainline/ia64/install/lib/gcc-lib/ia64-unknow
Configured with: ../../gcc/configure --prefix=/home/build/gcc_mainline/ia64/inst
all --enable-shared --enable-threads
Thread model: posix
gcc version 3.2 20020507 (experimental)

This is the first time I tried building Qt with the mainline.
It works fine with current 3.1 prerelease.

3.2 20020507 (experimental)

ia64-unknown-linux-gnu; Itanium, 
Red Hat Linux release 7.1.94 (Roswell)

Compile the attached preprocessed file with -O2 on
Comment 1 janis187 2002-10-11 11:40:16 UTC
From: Janis Johnson <janis187@us.ibm.com>
To: janis187@us.ibm.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/6597: ICE in set_mem_alias_set compiling Qt with -O2 on ia64
Date: Fri, 11 Oct 2002 11:40:16 -0700

 This ICE still occurs with GCC 3.3 20021008 (experimental) on ia64 when
 Qt is compiled with -O2.  It's a regression from GCC 3.1.  It doesn't
 occur when the mainline is built with checking disabled, so it won't
 show up in the release version unless GCC is built with checking
 enabled.  Qt passes all of its tests when built with -O2 using mainline
 G++ built with checking disabled.
 The bug was introduced sometime between 20020228 and 20020315.  GCC
 didn't build (even for a simple build of C and C++) on ia64-linux
 between those dates, which was right after 3.1 had branched so there
 were LOTS of changes.
 I'll leave this PR open for now, but unless the bug shows up in other
 places it's probably not worth worrying about.  Here's a cut-down test
 struct QWidget {
   void repaint (int x, int y, int w, int h, bool erase=true);
 foo ()
   typedef void (QWidget::*t14)(int, int, int, int, bool);
   t14 v14 = &QWidget::repaint;
Comment 2 Eric Botcazou 2003-02-19 10:23:11 UTC
State-Changed-From-To: open->feedback
State-Changed-Why: Janis, does the ICE still occur? If so, I think you should raise the PR priority since it's a regression.
Comment 3 Eric Botcazou 2003-03-07 01:41:03 UTC
From: Eric Botcazou <ebotcazou@libertysurf.fr>
To: Janis Johnson <janis187@us.ibm.com>
Cc: gcc-bugs@gcc.gnu.org,
Subject: Re: optimization/6597: ICE in set_mem_alias_set compiling Qt with -O2 on ia64
Date: Fri, 7 Mar 2003 01:41:03 +0100

 > The ICE still occurs on ia64-unknown-linux-gnu with today's
 > mainline and 3.3-branch, but only with checking enabled.
 > When checking is disabled, the code compiles cleanly.
 I think you should raise the priority anyway.
 Eric Botcazou
Comment 4 Dara Hazeghi 2003-06-02 02:59:13 UTC

with gcc 3.2.3, 3.3 branch and mainline (20030520) on IA64/HP-UX, I can't reproduce the ICE 
here. Can you confirm whether this still occurs? Thanks,

Comment 5 Andrew Pinski 2003-06-12 01:23:44 UTC
Man ia64 build is slow for scheduling.  Man gcc is slow with all checking turned on.

I also do not see this on the mainline (20030611) on a cross compiler from powerpc-
apple-darwin6.6 to ia64-unknown-linux-gnu (with all checking turned on, 
misc,tree,rtlflag,rtl,gc,gcac) with either the smaller testcase or the larger one. Can you 
check again?
Comment 6 janis187 2003-06-13 20:58:40 UTC
The problem does not occur on ia64-linux with today's mainline (20030613)
or with GCC 3.3 built with checking enabled, so this PR can be closed.

Sorry for the long delay; I didn't have access to an ia64 system for awhile.
Comment 7 Wolfgang Bangerth 2003-06-13 23:33:30 UTC
Janis reports this as fixed. Thanks for the feedback!