http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51300
Bug #: 51300 Summary: Internal error when using -flto with -O0 in the linker Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: miku...@artax.karlin.mff.cuni.cz Host: hppa-linux-gnu Target: hppa-linux-gnu Build: hppa-linux-gnu I get an internal error in gcc. Steps to reproduce: Use gcc 4.6.2 on Linux Debian 5 on PA-RISC Get Links browser 2.4 from http://links.twibright.com/download/ Compile it with -flto so that individual modules are compiled with an optimization, but the whole program is compiled without optimization: CFLAGS="-O -flto" LDFLAGS="-O0" ./configure && make The result is a gcc internal error: gcc -O -flto -O0 -o links af_unix.o auth.o beos.o bfu.o block.o bookmarks.o cache.o charsets.o connect.o cookies.o default.o dip.o directfb.o dither.o dns.o drivers.o error.o file.o finger.o font_include.o framebuffer.o ftp.o gif.o html.o html_gr.o html_r.o html_tbl.o http.o https.o img.o imgcache.o jpeg.o jsint.o kbd.o language.o links_icon.o listedit.o lru.o mailto.o main.o memory.o menu.o objreq.o os_dep.o pmshell.o png.o sched.o select.o session.o smb.o svgalib.o terminal.o tiff.o types.o url.o view.o view_gr.o x.o xbm.o -lbz2 -lz -lssl -lcrypto session.o: In function `continue_download': (.text+0x4f30): warning: the use of `tempnam' is dangerous, better use `mkstemp'In file included from :76:0: session.c: In function 'get_file_by_term': session.c:1937:12: internal compiler error: in insert_value_copy_on_edge, at tree-outof-ssa.c:242 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status