public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930
@ 2021-02-09 17:43 gscfq@t-online.de
  2021-02-09 18:08 ` [Bug c++/99035] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gscfq@t-online.de @ 2021-02-09 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99035
           Summary: [9/10/11 Regression] ICE in declare_weak, at
                    varasm.c:5930
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to r7 (r9 between 20190217 and 20190224),
with option -fsyntax-only :


$ g++-11-20210207 -c weak-6.c -fsyntax-only
weak-6.c:7:14: internal compiler error: in declare_weak, at varasm.c:5930
    7 | #pragma weak foo
      |              ^~~
0xf96654 declare_weak(tree_node*)
        ../../gcc/varasm.c:5930
0x86f6e1 apply_pragma_weak
        ../../gcc/c-family/c-pragma.c:265
0x870ae1 handle_pragma_weak
        ../../gcc/c-family/c-pragma.c:376
0x7777ac cp_parser_pragma
        ../../gcc/cp/parser.c:45120
0x7a03db cp_parser_translation_unit
        ../../gcc/cp/parser.c:4936
0x7a03db c_parse_file()
        ../../gcc/cp/parser.c:45179
0x86d982 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1218

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

* [Bug c++/99035] [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
@ 2021-02-09 18:08 ` mpolacek at gcc dot gnu.org
  2021-02-09 18:08 ` mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-02-09
     Ever confirmed|0                           |1
   Target Milestone|---                         |9.4
             Status|UNCONFIRMED                 |NEW
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org

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

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

* [Bug c++/99035] [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
  2021-02-09 18:08 ` [Bug c++/99035] " mpolacek at gcc dot gnu.org
@ 2021-02-09 18:08 ` mpolacek at gcc dot gnu.org
  2021-02-10 12:30 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/99035] [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
  2021-02-09 18:08 ` [Bug c++/99035] " mpolacek at gcc dot gnu.org
  2021-02-09 18:08 ` mpolacek at gcc dot gnu.org
@ 2021-02-10 12:30 ` jakub at gcc dot gnu.org
  2021-02-10 18:53 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 12:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50161
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50161&action=edit
gcc11-pr99035.patch

Untested fix.

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

* [Bug c++/99035] [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-02-10 12:30 ` jakub at gcc dot gnu.org
@ 2021-02-10 18:53 ` cvs-commit at gcc dot gnu.org
  2021-02-10 18:56 ` [Bug c++/99035] [9/10 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-10 18:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:0f39fb7b001df7cdba56cd5c572d0737667acd2c

commit r11-7178-g0f39fb7b001df7cdba56cd5c572d0737667acd2c
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Feb 10 19:52:37 2021 +0100

    varasm: Fix ICE with -fsyntax-only [PR99035]

    My FE change from 2 years ago uses TREE_ASM_WRITTEN in -fsyntax-only
    mode more aggressively to avoid "expanding" functions multiple times.
    With -fsyntax-only nothing is really expanded, so I think it is acceptable
    to adjust the assert and allow declare_weak at any time, with -fsyntax-only
    we know it is during parsing only anyway.

    2021-02-10  Jakub Jelinek  <jakub@redhat.com>

            PR c++/99035
            * varasm.c (declare_weak): For -fsyntax-only, allow even
            TREE_ASM_WRITTEN function decls.

            * g++.dg/ext/weak6.C: New test.

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

* [Bug c++/99035] [9/10 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-02-10 18:53 ` cvs-commit at gcc dot gnu.org
@ 2021-02-10 18:56 ` jakub at gcc dot gnu.org
  2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-10 18:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10/11 Regression] ICE in |[9/10 Regression] ICE in
                   |declare_weak, at            |declare_weak, at
                   |varasm.c:5930               |varasm.c:5930

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk (so far).

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

* [Bug c++/99035] [9/10 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-02-10 18:56 ` [Bug c++/99035] [9/10 " jakub at gcc dot gnu.org
@ 2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
  2021-03-20  8:07 ` [Bug c++/99035] [9 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-19 23:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:a964f494cd5a90f631b8c0c01777a9899e0351ce

commit r10-9467-ga964f494cd5a90f631b8c0c01777a9899e0351ce
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Feb 10 19:52:37 2021 +0100

    varasm: Fix ICE with -fsyntax-only [PR99035]

    My FE change from 2 years ago uses TREE_ASM_WRITTEN in -fsyntax-only
    mode more aggressively to avoid "expanding" functions multiple times.
    With -fsyntax-only nothing is really expanded, so I think it is acceptable
    to adjust the assert and allow declare_weak at any time, with -fsyntax-only
    we know it is during parsing only anyway.

    2021-02-10  Jakub Jelinek  <jakub@redhat.com>

            PR c++/99035
            * varasm.c (declare_weak): For -fsyntax-only, allow even
            TREE_ASM_WRITTEN function decls.

            * g++.dg/ext/weak6.C: New test.

    (cherry picked from commit 0f39fb7b001df7cdba56cd5c572d0737667acd2c)

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

* [Bug c++/99035] [9 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
@ 2021-03-20  8:07 ` jakub at gcc dot gnu.org
  2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-20  8:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10 Regression] ICE in    |[9 Regression] ICE in
                   |declare_weak, at            |declare_weak, at
                   |varasm.c:5930               |varasm.c:5930

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3 too.

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

* [Bug c++/99035] [9 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2021-03-20  8:07 ` [Bug c++/99035] [9 " jakub at gcc dot gnu.org
@ 2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
  2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
  2021-04-22 17:11 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:6496e9154309cbd911f944147da1246628e393da

commit r9-9418-g6496e9154309cbd911f944147da1246628e393da
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Feb 10 19:52:37 2021 +0100

    varasm: Fix ICE with -fsyntax-only [PR99035]

    My FE change from 2 years ago uses TREE_ASM_WRITTEN in -fsyntax-only
    mode more aggressively to avoid "expanding" functions multiple times.
    With -fsyntax-only nothing is really expanded, so I think it is acceptable
    to adjust the assert and allow declare_weak at any time, with -fsyntax-only
    we know it is during parsing only anyway.

    2021-02-10  Jakub Jelinek  <jakub@redhat.com>

            PR c++/99035
            * varasm.c (declare_weak): For -fsyntax-only, allow even
            TREE_ASM_WRITTEN function decls.

            * g++.dg/ext/weak6.C: New test.

    (cherry picked from commit a964f494cd5a90f631b8c0c01777a9899e0351ce)

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

* [Bug c++/99035] [9 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
  2021-04-22 17:11 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-22 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:cf6efaec4907422874ae8337c952c09f21e7defe

commit r8-10883-gcf6efaec4907422874ae8337c952c09f21e7defe
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Feb 10 19:52:37 2021 +0100

    varasm: Fix ICE with -fsyntax-only [PR99035]

    My FE change from 2 years ago uses TREE_ASM_WRITTEN in -fsyntax-only
    mode more aggressively to avoid "expanding" functions multiple times.
    With -fsyntax-only nothing is really expanded, so I think it is acceptable
    to adjust the assert and allow declare_weak at any time, with -fsyntax-only
    we know it is during parsing only anyway.

    2021-02-10  Jakub Jelinek  <jakub@redhat.com>

            PR c++/99035
            * varasm.c (declare_weak): For -fsyntax-only, allow even
            TREE_ASM_WRITTEN function decls.

            * g++.dg/ext/weak6.C: New test.

    (cherry picked from commit a964f494cd5a90f631b8c0c01777a9899e0351ce)

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

* [Bug c++/99035] [9 Regression] ICE in declare_weak, at varasm.c:5930
  2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 17:11 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-04-22 17:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 17:43 [Bug c++/99035] New: [9/10/11 Regression] ICE in declare_weak, at varasm.c:5930 gscfq@t-online.de
2021-02-09 18:08 ` [Bug c++/99035] " mpolacek at gcc dot gnu.org
2021-02-09 18:08 ` mpolacek at gcc dot gnu.org
2021-02-10 12:30 ` jakub at gcc dot gnu.org
2021-02-10 18:53 ` cvs-commit at gcc dot gnu.org
2021-02-10 18:56 ` [Bug c++/99035] [9/10 " jakub at gcc dot gnu.org
2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
2021-03-20  8:07 ` [Bug c++/99035] [9 " jakub at gcc dot gnu.org
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` 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).