public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak
@ 2023-12-01 21:07 zsojka at seznam dot cz
  2024-01-18 19:44 ` [Bug ipa/112815] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2023-12-01 21:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112815

            Bug ID: 112815
           Summary: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with
                    -flto -fno-weak
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 56759
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56759&action=edit
reduced testcase

This crashes at the same place as PR107990, but with a different backtrace. It
has common -fno-weak flag.

The original testcase didn't output the warning: 'T::T()::U::U()' used but
never defined

Compiler output:
$ x86_64-pc-linux-gnu-gcc -flto -fno-weak testcase.C
testcase.C:7:7: warning: 'T::T()::U::U()' used but never defined
    7 |       U ();
      |       ^
during IPA pass: *free_lang_data
testcase.C:5:12: internal compiler error: in vague_linkage_p, at
cp/decl2.cc:2329
    5 |     struct U
      |            ^
0x74d356 vague_linkage_p(tree_node*)
        /repo/gcc-trunk/gcc/cp/decl2.cc:2329
0x11394bf no_linkage_check(tree_node*, bool)
        /repo/gcc-trunk/gcc/cp/tree.cc:3022
0xfd1cf3 mangle_decl(tree_node*)
        /repo/gcc-trunk/gcc/cp/mangle.cc:4146
0x1ad0a8d decl_assembler_name(tree_node*)
        /repo/gcc-trunk/gcc/tree.cc:719
0x1af7747 assign_assembler_name_if_needed(tree_node*)
        /repo/gcc-trunk/gcc/tree.cc:834
0x2916760 free_lang_data_in_cgraph
        /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1064
0x2916760 free_lang_data
        /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1109
0x2916760 execute
        /repo/gcc-trunk/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-6051-20231201105652-gb1fe98dee21-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-6051-20231201105652-gb1fe98dee21-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231201 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/112815] ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak
  2023-12-01 21:07 [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak zsojka at seznam dot cz
@ 2024-01-18 19:44 ` mpolacek at gcc dot gnu.org
  2024-01-18 19:44 ` [Bug ipa/112815] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-01-18 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112815

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |ipa
   Last reconfirmed|                            |2024-01-18

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

Started with r6-1066-g233ce289250944:

commit 233ce289250944dde071638799f9ba1a51a0a9bf
Author: Jan Hubicka <hubicka@ucw.cz>
Date:   Sun May 24 21:38:14 2015 +0200

    re PR lto/66180 (many -Wodr false positives when building LLVM with -flto)


            PR lto/66180
            * ipa-devirt.c (type_with_linkage): Check that TYPE_STUB_DECL
            is set; check for assembler name at LTO time.
            (type_in_anonymous_namespace): Remove hacks, check that all
            anonymous types are called "<anon>"
            (odr_type_p): Simplify; add check for "<anon>"
            (odr_subtypes_equivalent): Add odr_type_p check.
            * tree.c (need_assembler_name_p): Even anonymous namespace needs
            assembler name.
            * mangle.c (mangle_decl): Mangle anonymous namespace types as
            "<anon>".
            * g++.dg/lto/pr66180_0.C: New testcase.
            * g++.dg/lto/pr66180_1.C: New testcase.

    From-SVN: r223633

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/112815] [11/12/13/14 Regression] ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak
  2023-12-01 21:07 [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak zsojka at seznam dot cz
  2024-01-18 19:44 ` [Bug ipa/112815] " mpolacek at gcc dot gnu.org
@ 2024-01-18 19:44 ` mpolacek at gcc dot gnu.org
  2024-03-07 21:00 ` law at gcc dot gnu.org
  2024-03-12 13:22 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-01-18 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112815

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE: in vague_linkage_p, at |[11/12/13/14 Regression]
                   |cp/decl2.cc:2329 with -flto |ICE: in vague_linkage_p, at
                   |-fno-weak                   |cp/decl2.cc:2329 with -flto
                   |                            |-fno-weak
   Target Milestone|---                         |11.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/112815] [11/12/13/14 Regression] ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak
  2023-12-01 21:07 [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak zsojka at seznam dot cz
  2024-01-18 19:44 ` [Bug ipa/112815] " mpolacek at gcc dot gnu.org
  2024-01-18 19:44 ` [Bug ipa/112815] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
@ 2024-03-07 21:00 ` law at gcc dot gnu.org
  2024-03-12 13:22 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 21:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112815

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |law at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/112815] [11/12/13/14 Regression] ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak
  2023-12-01 21:07 [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-03-07 21:00 ` law at gcc dot gnu.org
@ 2024-03-12 13:22 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-03-12 13:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112815

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
           Priority|P1                          |P2

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 6-13 has been released with this bug, so P2.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-12 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-01 21:07 [Bug c++/112815] New: ICE: in vague_linkage_p, at cp/decl2.cc:2329 with -flto -fno-weak zsojka at seznam dot cz
2024-01-18 19:44 ` [Bug ipa/112815] " mpolacek at gcc dot gnu.org
2024-01-18 19:44 ` [Bug ipa/112815] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2024-03-07 21:00 ` law at gcc dot gnu.org
2024-03-12 13:22 ` jakub at gcc dot gnu.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).