Bug 40723 - Optimizer Causes Undefined References
Summary: Optimizer Causes Undefined References
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-12 00:12 UTC by James McKelvey
Modified: 2009-10-17 19:24 UTC (History)
2 users (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Build that shows errors (5.44 KB, application/octet-stream)
2009-07-12 00:13 UTC, James McKelvey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James McKelvey 2009-07-12 00:12:16 UTC
Valid code that links fine without optimization gets undefined references at -O3. The references are to such as vtable, L8185, WinMain, etc.

Full log attached. I await direction as to what to provide to help solve this. Temps will be fairly large, and I don't know how to approach a smaller test case.

(Compile error in log has been separately reported.)

Cygwin and svn update are recent.


uname -a
CYGWIN_NT-5.1 MCKELVEY-XP 1.7.0(0.210/5/3) 2009-06-18 12:51 i686 Cygwin

g++ -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: /cygdrive/e/Home/cvsroot/gcc/configure --verbose --enable-threads --disable-nls --enable-checking=release --disable-win32-registry --enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20090705 (experimental) (GCC) 

BUILDING:
alias CONFIGURECVS='/cygdrive/e/Home/cvsroot/gcc/configure     --verbose --enable-threads --disable-nls --enable-checking=release     --disable-win32-registry --enable-languages=c,c++ 2>&1 | tee clog'

alias BUILD='nice make CFLAGS='\'''\'' BOOT_CFLAGS='\'''\'' LIBCFLAGS='\''-g -O'\''     CXXFLAGS='\''-O'\'' LIBCXXFLAGS='\''-g -O'\''     bootstrap 2>&1 | tee log'
Comment 1 James McKelvey 2009-07-12 00:13:53 UTC
Created attachment 18178 [details]
Build that shows errors
Comment 2 Andrew Pinski 2009-07-12 00:15:57 UTC
this looks like a different problem, that is an error is causing gcc to leave behind a .o file which is invalid ...
Comment 3 James McKelvey 2009-10-17 19:02:09 UTC
Latest from subversion, bug no longer occurs. I think we can close.
Comment 4 Manuel López-Ibáñez 2009-10-17 19:24:06 UTC
The reporter cannot reproduce this anymore, no testcase available. Closed as WORKSFORME. Please reopen if you find a testcase or it fails again.