public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12047] New: Problems with optimization (O3)
@ 2003-08-25 3:54 gcc-bugzilla at gcc dot gnu dot org
2003-08-25 4:03 ` [Bug optimization/12047] [unit-at-a-time] not emitting typeinfo pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-08-25 3:54 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
Summary: Problems with optimization (O3)
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter at peem dot als dot lbl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Enabling optimization at the O3 level breaks the build of the source file
s.C. gcc 3.3 has no problems compiling this code.
Environment:
System: Linux kiste 2.4.20-4GB #1 Fri Jul 11 07:33:18 UTC 2003 i686 unknown unknown GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
How-To-Repeat:
source code s.C
template<typename T, T low, T high>
struct Range {
struct Error {};
Range(T value): value_(value) {
if (value>=high || value<low)
throw Error();
}
Range& operator=(Range &r) { this->value_ = r.value_; }
Range& operator=(T value) { return *this = Range(value); }
operator T() { return value_; }
private:
T value_;
};
extern double const low = -1.0, high = 1.0;
Range<double const&, low, high> val(0.0);
int main() {
try {
val = 2.0;
} catch (...) {
}
return 0;
}
g++ -v -O3 s.C
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4 20030820 (experimental)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -quiet -v -D_GNU_SOURCE s.C -quiet -dumpbase s.C -mtune=pentiumpro -auxbase s -O3 -version -o /tmp/cckwfSf6.s
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/i686-pc-linux-gnu
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/backward
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include
/usr/include
End of search list.
GNU C++ version 3.4 20030820 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20030820 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31899
as -V -Qy -o /tmp/ccWmViR6.o /tmp/cckwfSf6.s
GNU assembler version 2.13.90.0.18 (i486-suse-linux) using BFD version 2.13.90.0.18 20030121 (SuSE Linux)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc/i686-pc-linux-gnu/3.4/crtbegin.o -L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4 -L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../.. /tmp/ccWmViR6.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc/i686-pc-linux-gnu/3.4/crtend.o /usr/lib/crtn.o
/tmp/ccWmViR6.o(.text+0x52): In function `main':
: undefined reference to `typeinfo for Range<double const&, low, high>::Error'
/tmp/ccWmViR6.o(.gnu.linkonce.t._ZN5RangeIRKdXL_Z3lowEEXL_Z4highEEEaSES1_+0x4b): In function `Range<double const&, low, high>::operator=(double const&)':
: undefined reference to `typeinfo for Range<double const&, low, high>::Error'
collect2: ld returned 1 exit status
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/12047] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
@ 2003-08-25 4:03 ` pinskia at gcc dot gnu dot org
2003-09-10 22:14 ` [Bug optimization/12047] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-25 4:03 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |hubicka at gcc dot gnu dot
|dot org |org
Severity|normal |critical
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Keywords| |wrong-code
Priority|P3 |P1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-25 04:03:05
date| |
Summary|Problems with optimization |[unit-at-a-time] not
|(O3) |emitting typeinfo
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-25 04:03 -------
I can confirm this on the mainline (20030825). It is caused by unit-at-a-time which is enabled at
-O3.
Jan this is your problem.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
2003-08-25 4:03 ` [Bug optimization/12047] [unit-at-a-time] not emitting typeinfo pinskia at gcc dot gnu dot org
@ 2003-09-10 22:14 ` pinskia at gcc dot gnu dot org
2003-09-18 16:00 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-10 22:14 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |snyder at fnal dot gov
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-10 22:14 -------
*** Bug 12241 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug optimization/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
2003-08-25 4:03 ` [Bug optimization/12047] [unit-at-a-time] not emitting typeinfo pinskia at gcc dot gnu dot org
2003-09-10 22:14 ` [Bug optimization/12047] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-09-18 16:00 ` pinskia at gcc dot gnu dot org
2003-09-18 17:08 ` [Bug c++/12047] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-18 16:00 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fw at deneb dot enyo dot de
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-18 15:49 -------
*** Bug 12327 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-09-18 16:00 ` pinskia at gcc dot gnu dot org
@ 2003-09-18 17:08 ` pinskia at gcc dot gnu dot org
2003-09-28 0:40 ` hubicka at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-18 17:08 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|optimization |c++
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-18 16:07 -------
A simpler example is:
struct cl{}
int main(){throw cl();}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-09-18 17:08 ` [Bug c++/12047] " pinskia at gcc dot gnu dot org
@ 2003-09-28 0:40 ` hubicka at gcc dot gnu dot org
2003-09-28 4:04 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2003-09-28 0:40 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From hubicka at gcc dot gnu dot org 2003-09-27 22:11 -------
The testcase no longer reproduces for me. I fixed similar issue some time ago
so I guess this got fixed as well.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-09-28 0:40 ` hubicka at gcc dot gnu dot org
@ 2003-09-28 4:04 ` pinskia at gcc dot gnu dot org
2003-09-28 11:05 ` hubicka at ucw dot cz
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-28 4:04 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-27 22:44 -------
I can reproduce it with the same example and the larger one still in the mainline
(20030926 and 20030925).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2003-09-28 4:04 ` pinskia at gcc dot gnu dot org
@ 2003-09-28 11:05 ` hubicka at ucw dot cz
2003-09-29 21:50 ` cvs-commit at gcc dot gnu dot org
2003-09-29 22:15 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2003-09-28 11:05 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
------- Additional Comments From hubicka at ucw dot cz 2003-09-28 07:45 -------
Subject: Re: [3.4 Regression] [unit-at-a-time] not emitting typeinfo
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
>
>
> pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|RESOLVED |REOPENED
> Resolution|FIXED |
>
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-27 22:44 -------
> I can reproduce it with the same example and the larger one still in the mainline
> (20030926 and 20030925).
I see, this fails again with latest snapshot but didn't with one two
weeks old nor the hammer branch. I am investigating what broke. Thanks
for verifying this!
Honza
>
>
>
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2003-09-28 11:05 ` hubicka at ucw dot cz
@ 2003-09-29 21:50 ` cvs-commit at gcc dot gnu dot org
2003-09-29 22:15 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-29 21:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-09-29 21:19 -------
Subject: Bug 12047
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: hubicka@gcc.gnu.org 2003-09-29 21:19:11
Modified files:
gcc : ChangeLog varasm.c gcov-io.c profile.c
gcc/cp : ChangeLog except.c
Log message:
PR c++/12175
* varasm.c (notice_global_symbol): Discard external symbols.
PR optimization/12286
* gcov-io.c (gcov_read_words): Fix memmove call.
* profile.c (compute_branch_probabilities): Add extra sanity checks.
PR C++/12047
* except.c (build_eh_type_type): Call mark_used on the type.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1216&r2=2.1217
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.386&r2=1.387
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcov-io.c.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/profile.c.diff?cvsroot=gcc&r1=1.125&r2=1.126
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3709&r2=1.3710
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/except.c.diff?cvsroot=gcc&r1=1.159&r2=1.160
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12047] [3.4 Regression] [unit-at-a-time] not emitting typeinfo
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2003-09-29 21:50 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-29 22:15 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-29 22:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12047
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-29 21:33 -------
Fixed by the patch.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-09-29 21:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-25 3:54 [Bug optimization/12047] New: Problems with optimization (O3) gcc-bugzilla at gcc dot gnu dot org
2003-08-25 4:03 ` [Bug optimization/12047] [unit-at-a-time] not emitting typeinfo pinskia at gcc dot gnu dot org
2003-09-10 22:14 ` [Bug optimization/12047] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-09-18 16:00 ` pinskia at gcc dot gnu dot org
2003-09-18 17:08 ` [Bug c++/12047] " pinskia at gcc dot gnu dot org
2003-09-28 0:40 ` hubicka at gcc dot gnu dot org
2003-09-28 4:04 ` pinskia at gcc dot gnu dot org
2003-09-28 11:05 ` hubicka at ucw dot cz
2003-09-29 21:50 ` cvs-commit at gcc dot gnu dot org
2003-09-29 22:15 ` pinskia 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).