Code that compiles and links when using -O0 fails to link when using -O3. Details: Mac OS 10.3.2 % g++ -v Reading specs from /usr/local_cci/gcc_cvs_head_20040316/lib/gcc/powerpc-apple- darwin7.2.0/3.5.0/specs Configured with: /net/worm/scratch1/rwgk/gcc_cvs_head/configure -- prefix=/usr/local_cci/gcc_cvs_head_20040316 --enable-languages=c,c++ Thread model: posix gcc version 3.5.0 20040316 (experimental) % g++ -O0 tst_base_256.cpp % a.out OK % g++ -O3 tst_base_256.cpp /usr/bin/ld: /var/tmp//ccef91em.o has external relocation entries in non- writable section (__TEXT,__text) for symbols: std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) collect2: ld returned 1 exit status I will attach tst_base_256.cpp. The same file is also available here: http://cci.lbl.gov/~rwgk/bugs/gcc350/tst_base_256.cpp
Created attachment 5935 [details] testcase
This is a dup of bug 14580. The problem is that the darwin back-end does not reject a direct call when it should or calls the stub when it should. *** This bug has been marked as a duplicate of 14580 ***