public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27465] New: ICE on dependent const folding
@ 2006-05-06 22:18 tneumann at pi3 dot informatik dot uni-mannheim dot de
2006-05-07 3:11 ` [Bug c++/27465] [4.0 only] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tneumann at pi3 dot informatik dot uni-mannheim dot de @ 2006-05-06 22:18 UTC (permalink / raw)
To: gcc-bugs
Performing constant calculations depending on template parameters causes an
internal compiler error. Compile the code below with g++ -c foo.cpp to
reproduce.
template <class T> struct A {
static const unsigned a = (sizeof(T[3])-sizeof(T[2]));
unsigned foo(unsigned b) { return a*b; }
};
I do not get the ICE when compiling the code with my distribution compiler
(Ubuntu Dapper gcc 4.0.3), only with my self-compiled 4.0.3 that has checking
enabled. I only noticed this by accident when I build a checking compiler to
hunt a different gcc bug.
My configuration options as shown by g++ -v (mostly copied from the
distribution compiler):
../configure --enable-languages=c,c++ --prefix=/home/tneumann/gcc4
--enable-shared --with-system-zlib --without-included-gettext
--enable-threads=posix --enable-nls --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --disable-werror --enable-checking --disable-multilib
x86_64-linux-gnu
--
Summary: ICE on dependent const folding
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tneumann at pi3 dot informatik dot uni-mannheim dot de
GCC host triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27465
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/27465] [4.0 only] ICE on dependent const folding
2006-05-06 22:18 [Bug c++/27465] New: ICE on dependent const folding tneumann at pi3 dot informatik dot uni-mannheim dot de
@ 2006-05-07 3:11 ` pinskia at gcc dot gnu dot org
2006-05-26 15:18 ` bangerth at dealii dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-07 3:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-07 03:11 -------
This was fixed for sure by PR 23357.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |23357
Summary|ICE on dependent const |[4.0 only] ICE on dependent
|folding |const folding
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27465
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/27465] [4.0 only] ICE on dependent const folding
2006-05-06 22:18 [Bug c++/27465] New: ICE on dependent const folding tneumann at pi3 dot informatik dot uni-mannheim dot de
2006-05-07 3:11 ` [Bug c++/27465] [4.0 only] " pinskia at gcc dot gnu dot org
@ 2006-05-26 15:18 ` bangerth at dealii dot org
2006-05-26 16:36 ` tneumann at pi3 dot informatik dot uni-mannheim dot de
2007-02-03 16:56 ` gdr at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: bangerth at dealii dot org @ 2006-05-26 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from bangerth at dealii dot org 2006-05-26 15:18 -------
This works fine with 4.0.2, and 4.1-pre and 4.2-pre snapshots I have here.
Could you check that it works for you as well with a recent snapshot?
Thanks
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27465
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/27465] [4.0 only] ICE on dependent const folding
2006-05-06 22:18 [Bug c++/27465] New: ICE on dependent const folding tneumann at pi3 dot informatik dot uni-mannheim dot de
2006-05-07 3:11 ` [Bug c++/27465] [4.0 only] " pinskia at gcc dot gnu dot org
2006-05-26 15:18 ` bangerth at dealii dot org
@ 2006-05-26 16:36 ` tneumann at pi3 dot informatik dot uni-mannheim dot de
2007-02-03 16:56 ` gdr at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tneumann at pi3 dot informatik dot uni-mannheim dot de @ 2006-05-26 16:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tneumann at pi3 dot informatik dot uni-mannheim dot de 2006-05-26 16:35 -------
This still happens with gcc-4.0-20060518, see the error message below. The
gcc-4.[12] branches presumably work, I only tried 4.1.
./gcc4/bin/g++ -c foo.cpp
foo.cpp: In member function 'unsigned int A<T>::foo(unsigned int)':
foo.cpp:3: internal compiler error: tree check: expected class 'type', have
'type' (array_type) in operand_equal_p, at fold-const.c:2404
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
tneumann at pi3 dot informatik dot uni-mannheim dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27465
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/27465] [4.0 only] ICE on dependent const folding
2006-05-06 22:18 [Bug c++/27465] New: ICE on dependent const folding tneumann at pi3 dot informatik dot uni-mannheim dot de
` (2 preceding siblings ...)
2006-05-26 16:36 ` tneumann at pi3 dot informatik dot uni-mannheim dot de
@ 2007-02-03 16:56 ` gdr at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 16:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from gdr at gcc dot gnu dot org 2007-02-03 16:56 -------
Works in GCC-4.1.x. Won't fix in GCC-4.0.x.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27465
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-03 16:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-06 22:18 [Bug c++/27465] New: ICE on dependent const folding tneumann at pi3 dot informatik dot uni-mannheim dot de
2006-05-07 3:11 ` [Bug c++/27465] [4.0 only] " pinskia at gcc dot gnu dot org
2006-05-26 15:18 ` bangerth at dealii dot org
2006-05-26 16:36 ` tneumann at pi3 dot informatik dot uni-mannheim dot de
2007-02-03 16:56 ` gdr at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).