public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sujian.liu at huawei dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/95677] New: undefined reference to `(anonymous namespace)::xx' Date: Mon, 15 Jun 2020 08:00:18 +0000 [thread overview] Message-ID: <bug-95677-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95677 Bug ID: 95677 Summary: undefined reference to `(anonymous namespace)::xx' Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: sujian.liu at huawei dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 48731 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48731&action=edit dejagnu/testsuite-7.3/g++.old-deja/g++.ns/extern1.C When compile with lto,it will be reported the following error: ./riscv32-unknown-elf-gcc dejagnu/testsuite-7.3/g++.old-deja/g++.ns/extern1.C -o extern1.exe -flto /home/lsj/gits/gcc_10_1_0/build/hcc_riscv32/riscv32_elf_build_dir/hcc_riscv32/bin/../lib/gcc/riscv32-unknown-elf/10.1.0/../../../../riscv32-unknown-elf/bin/ld: /tmp/extern1.exe.m1gfd6.ltrans0.ltrans.o: in function `.L0 ': <artificial>:(.text+0x6): undefined reference to `(anonymous namespace)::xx' /home/lsj/gits/gcc_10_1_0/build/hcc_riscv32/riscv32_elf_build_dir/hcc_riscv32/bin/../lib/gcc/riscv32-unknown-elf/10.1.0/../../../../riscv32-unknown-elf/bin/ld: <artificial>:(.text+0xa): undefined reference to `(anonymous namespace)::xx' collect2: error: ld returned 1 exit status It seems that lto can't deal with the extern variable in the namespace. The testcase which is one of deja in testsuite-7.3 will be attached.
next reply other threads:[~2020-06-15 8:00 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-15 8:00 sujian.liu at huawei dot com [this message] 2020-06-15 8:12 ` [Bug c++/95677] " rguenth at gcc dot gnu.org 2020-06-15 8:36 ` sujian.liu at huawei dot com 2020-06-15 12:02 ` nathan at gcc dot gnu.org 2020-06-15 12:05 ` rguenth at gcc dot gnu.org 2020-06-15 12:07 ` rguenth at gcc dot gnu.org 2020-06-15 12:28 ` nathan at gcc dot gnu.org 2020-06-18 7:34 ` sujian.liu at huawei dot com 2020-07-15 1:40 ` sujian.liu at huawei dot com 2020-09-16 8:11 ` sujian.liu at huawei dot com 2020-09-23 17:41 ` nathan at gcc dot gnu.org 2020-10-07 14:35 ` nathan at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-95677-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).