public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc
@ 2023-05-10 20:55 christian.prochaska@genode-labs.com
  2023-05-10 20:56 ` [Bug c++/109804] " christian.prochaska@genode-labs.com
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: christian.prochaska@genode-labs.com @ 2023-05-10 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109804
           Summary: internal compiler error in gimple-ssa-warn-access.cc
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christian.prochaska@genode-labs.com
  Target Milestone: ---

Created attachment 55042
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55042&action=edit
output from -freport-bug

during GIMPLE pass: waccess
test.cc: In function ‘T* Genode::construct_at(void*, ARGS&& ...) [with T = B;
ARGS = {C::C()::<unnamed enum>&}]’:
test.cc:37:19: internal compiler error: Segmentation fault
   37 | static inline T * Genode::construct_at(void *at, ARGS &&... args)
      |                   ^~~~~~
0xe67c7f crash_signal
        ../../gcc/toplev.cc:314
0xbb2320 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1626
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb23b9 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1724
0xbb7720 new_delete_mismatch_p
        ../../gcc/gimple-ssa-warn-access.cc:1763
0xbb7720 matching_alloc_calls_p
        ../../gcc/gimple-ssa-warn-access.cc:1786
0xbbf214 matching_alloc_calls_p
        ../../gcc/gimple-ssa-warn-access.cc:1984
0xbbf214 maybe_check_dealloc_call
        ../../gcc/gimple-ssa-warn-access.cc:3757
0xbbf214 check_call
        ../../gcc/gimple-ssa-warn-access.cc:4367
0xbbf214 check_block
        ../../gcc/gimple-ssa-warn-access.cc:4444
0xbbf214 execute
        ../../gcc/gimple-ssa-warn-access.cc:4766

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

* [Bug c++/109804] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
@ 2023-05-10 20:56 ` christian.prochaska@genode-labs.com
  2023-05-10 20:59 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: christian.prochaska@genode-labs.com @ 2023-05-10 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Christian Prochaska <christian.prochaska@genode-labs.com> ---
Created attachment 55043
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55043&action=edit
test.cc

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
  2023-05-10 20:56 ` [Bug c++/109804] " christian.prochaska@genode-labs.com
@ 2023-05-10 20:59 ` mpolacek at gcc dot gnu.org
  2023-05-10 21:02 ` mpolacek at gcc dot gnu.org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-10 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.4
                 CC|                            |mpolacek at gcc dot gnu.org
   Last reconfirmed|                            |2023-05-10
            Summary|internal compiler error in  |[11/12/13/14 Regression]
                   |gimple-ssa-warn-access.cc   |internal compiler error in
                   |                            |gimple-ssa-warn-access.cc
     Ever confirmed|0                           |1

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

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
  2023-05-10 20:56 ` [Bug c++/109804] " christian.prochaska@genode-labs.com
  2023-05-10 20:59 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
@ 2023-05-10 21:02 ` mpolacek at gcc dot gnu.org
  2023-05-10 21:13 ` [Bug tree-optimization/109804] " pinskia at gcc dot gnu.org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-10 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r11-6507

commit fd64f348a6b40621dc2bcc743f5fdfb31ed0894c
Author: Martin Sebor <msebor@redhat.com>
Date:   Wed Jan 6 13:36:18 2021 -0700

    PR c++/98305 spurious -Wmismatched-new-delete on template instance

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

* [Bug tree-optimization/109804] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (2 preceding siblings ...)
  2023-05-10 21:02 ` mpolacek at gcc dot gnu.org
@ 2023-05-10 21:13 ` pinskia at gcc dot gnu.org
  2023-05-10 21:13 ` pinskia at gcc dot gnu.org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2023-05-10 00:00:00         |
     Ever confirmed|1                           |0
             Status|NEW                         |UNCONFIRMED
            Summary|[11/12/13/14 Regression]    |internal compiler error in
                   |internal compiler error in  |gimple-ssa-warn-access.cc
                   |gimple-ssa-warn-access.cc   |
      Known to fail|                            |11.1.0, 12.1.0, 13.1.0,
                   |                            |14.0

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

* [Bug tree-optimization/109804] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (3 preceding siblings ...)
  2023-05-10 21:13 ` [Bug tree-optimization/109804] " pinskia at gcc dot gnu.org
@ 2023-05-10 21:13 ` pinskia at gcc dot gnu.org
  2023-05-10 21:14 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-05-10
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

* [Bug tree-optimization/109804] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (4 preceding siblings ...)
  2023-05-10 21:13 ` pinskia at gcc dot gnu.org
@ 2023-05-10 21:14 ` pinskia at gcc dot gnu.org
  2023-05-10 21:16 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 55044
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55044&action=edit
reduced as much as I could get it for the trunk (note GCC 11 fails still too)

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (5 preceding siblings ...)
  2023-05-10 21:14 ` pinskia at gcc dot gnu.org
@ 2023-05-10 21:16 ` pinskia at gcc dot gnu.org
  2023-05-10 21:17 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the ICE moved from maybe_emit_free_warning in expand.c in GCC 11 to
new_delete_mismatch_p in gimple-ssa-warn-access.cc in GCC 12+.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (6 preceding siblings ...)
  2023-05-10 21:16 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2023-05-10 21:17 ` pinskia at gcc dot gnu.org
  2023-05-10 21:18 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am suspecting the `unnamed enum` is causing the ICE.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (7 preceding siblings ...)
  2023-05-10 21:17 ` pinskia at gcc dot gnu.org
@ 2023-05-10 21:18 ` pinskia at gcc dot gnu.org
  2023-05-10 21:48 ` mpolacek at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-10 21:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> I am suspecting the `unnamed enum` is causing the ICE.

I mean the local unnamed enums is what is exposing the ICE. Naming either of
them and the ICE goes away.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (8 preceding siblings ...)
  2023-05-10 21:18 ` pinskia at gcc dot gnu.org
@ 2023-05-10 21:48 ` mpolacek at gcc dot gnu.org
  2023-05-11  6:30 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-10 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Right.  Local unnamed enums are of the DEMANGLE_COMPONENT_UNNAMED_TYPE type,
but those don't have their subtrees filed as per cplus_demangle_fill_component.
 So I think we can't do *newc.u.s_binary.left when the type is
DEMANGLE_COMPONENT_UNNAMED_TYPE.  Maybe they need a new case in
new_delete_mismatch_p.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (9 preceding siblings ...)
  2023-05-10 21:48 ` mpolacek at gcc dot gnu.org
@ 2023-05-11  6:30 ` rguenth at gcc dot gnu.org
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-11  6:30 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (10 preceding siblings ...)
  2023-05-11  6:30 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:08 ` jakub at gcc dot gnu.org
  2024-02-21  7:23 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.5

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (11 preceding siblings ...)
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
@ 2024-02-21  7:23 ` pinskia at gcc dot gnu.org
  2024-02-22 17:29 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-21  7:23 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #9)
> Right.  Local unnamed enums are of the DEMANGLE_COMPONENT_UNNAMED_TYPE type,
> but those don't have their subtrees filed as per
> cplus_demangle_fill_component.  So I think we can't do *newc.u.s_binary.left
> when the type is DEMANGLE_COMPONENT_UNNAMED_TYPE.  Maybe they need a new
> case in new_delete_mismatch_p.

      ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE;
      ret->u.s_number.number = num;


Yes and we just need to compare the number.
Let me add that and test it.

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

* [Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (12 preceding siblings ...)
  2024-02-21  7:23 ` pinskia at gcc dot gnu.org
@ 2024-02-22 17:29 ` cvs-commit at gcc dot gnu.org
  2024-02-22 17:30 ` [Bug tree-optimization/109804] [11/12/13 " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-22 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:1076ffda6ce5e6d5fc9577deaf8233e549e5787a

commit r14-9138-g1076ffda6ce5e6d5fc9577deaf8233e549e5787a
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Feb 21 20:12:21 2024 -0800

    warn-access: Fix handling of unnamed types [PR109804]

    This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE.
    DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while
    the code expected newc.u.s_binary.left would be valid.
    So this treats DEMANGLE_COMPONENT_UNNAMED_TYPE like we treat function
paramaters
    (DEMANGLE_COMPONENT_FUNCTION_PARAM) and template paramaters
(DEMANGLE_COMPONENT_TEMPLATE_PARAM).

    Note the code in the demangler does this when it sets
DEMANGLE_COMPONENT_UNNAMED_TYPE:
          ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE;
          ret->u.s_number.number = num;

    Committed as obvious after bootstrap/test on x86_64-linux-gnu

            PR tree-optimization/109804

    gcc/ChangeLog:

            * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Handle
            DEMANGLE_COMPONENT_UNNAMED_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wmismatched-new-delete-8.C: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

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

* [Bug tree-optimization/109804] [11/12/13 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (13 preceding siblings ...)
  2024-02-22 17:29 ` cvs-commit at gcc dot gnu.org
@ 2024-02-22 17:30 ` pinskia at gcc dot gnu.org
  2024-02-22 21:13 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-22 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|14.0                        |
            Summary|[11/12/13/14 Regression]    |[11/12/13 Regression]
                   |internal compiler error in  |internal compiler error in
                   |gimple-ssa-warn-access.cc   |gimple-ssa-warn-access.cc
      Known to work|                            |14.0

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk so far.

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

* [Bug tree-optimization/109804] [11/12/13 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (14 preceding siblings ...)
  2024-02-22 17:30 ` [Bug tree-optimization/109804] [11/12/13 " pinskia at gcc dot gnu.org
@ 2024-02-22 21:13 ` cvs-commit at gcc dot gnu.org
  2024-02-22 21:13 ` [Bug tree-optimization/109804] [11/12 " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-22 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:

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

commit r13-8354-ga15427e75f2521ed5e467e3c5cb8446586bbdabb
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Feb 21 20:12:21 2024 -0800

    warn-access: Fix handling of unnamed types [PR109804]

    This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE.
    DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while
    the code expected newc.u.s_binary.left would be valid.
    So this treats DEMANGLE_COMPONENT_UNNAMED_TYPE like we treat function
paramaters
    (DEMANGLE_COMPONENT_FUNCTION_PARAM) and template paramaters
(DEMANGLE_COMPONENT_TEMPLATE_PARAM).

    Note the code in the demangler does this when it sets
DEMANGLE_COMPONENT_UNNAMED_TYPE:
          ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE;
          ret->u.s_number.number = num;

    Committed as obvious after bootstrap/test on x86_64-linux-gnu

            PR tree-optimization/109804

    gcc/ChangeLog:

            * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Handle
            DEMANGLE_COMPONENT_UNNAMED_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wmismatched-new-delete-8.C: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
    (cherry picked from commit 1076ffda6ce5e6d5fc9577deaf8233e549e5787a)

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

* [Bug tree-optimization/109804] [11/12 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (15 preceding siblings ...)
  2024-02-22 21:13 ` cvs-commit at gcc dot gnu.org
@ 2024-02-22 21:13 ` pinskia at gcc dot gnu.org
  2024-05-08 17:11 ` cvs-commit at gcc dot gnu.org
  2024-05-08 17:16 ` [Bug tree-optimization/109804] [11 " pinskia at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-22 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |13.2.1
            Summary|[11/12/13 Regression]       |[11/12 Regression] internal
                   |internal compiler error in  |compiler error in
                   |gimple-ssa-warn-access.cc   |gimple-ssa-warn-access.cc

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 13.3.0 also.

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

* [Bug tree-optimization/109804] [11/12 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (16 preceding siblings ...)
  2024-02-22 21:13 ` [Bug tree-optimization/109804] [11/12 " pinskia at gcc dot gnu.org
@ 2024-05-08 17:11 ` cvs-commit at gcc dot gnu.org
  2024-05-08 17:16 ` [Bug tree-optimization/109804] [11 " pinskia at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-08 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:16319f8fba6c049d743046488588f40da2349048

commit r12-10432-g16319f8fba6c049d743046488588f40da2349048
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Feb 21 20:12:21 2024 -0800

    warn-access: Fix handling of unnamed types [PR109804]

    This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE.
    DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while
    the code expected newc.u.s_binary.left would be valid.
    So this treats DEMANGLE_COMPONENT_UNNAMED_TYPE like we treat function
paramaters
    (DEMANGLE_COMPONENT_FUNCTION_PARAM) and template paramaters
(DEMANGLE_COMPONENT_TEMPLATE_PARAM).

    Note the code in the demangler does this when it sets
DEMANGLE_COMPONENT_UNNAMED_TYPE:
          ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE;
          ret->u.s_number.number = num;

    Committed as obvious after bootstrap/test on x86_64-linux-gnu

            PR tree-optimization/109804

    gcc/ChangeLog:

            * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Handle
            DEMANGLE_COMPONENT_UNNAMED_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wmismatched-new-delete-8.C: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
    (cherry picked from commit 1076ffda6ce5e6d5fc9577deaf8233e549e5787a)

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

* [Bug tree-optimization/109804] [11 Regression] internal compiler error in gimple-ssa-warn-access.cc
  2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
                   ` (17 preceding siblings ...)
  2024-05-08 17:11 ` cvs-commit at gcc dot gnu.org
@ 2024-05-08 17:16 ` pinskia at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12 Regression] internal |[11 Regression] internal
                   |compiler error in           |compiler error in
                   |gimple-ssa-warn-access.cc   |gimple-ssa-warn-access.cc
      Known to fail|                            |13.2.0
      Known to work|                            |12.3.1

--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Backported the fix to GCC 12 branch too. GCC 11 requires a different patch so
leaving it open if someone wants it fixed there.

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

end of thread, other threads:[~2024-05-08 17:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 20:55 [Bug c++/109804] New: internal compiler error in gimple-ssa-warn-access.cc christian.prochaska@genode-labs.com
2023-05-10 20:56 ` [Bug c++/109804] " christian.prochaska@genode-labs.com
2023-05-10 20:59 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-05-10 21:02 ` mpolacek at gcc dot gnu.org
2023-05-10 21:13 ` [Bug tree-optimization/109804] " pinskia at gcc dot gnu.org
2023-05-10 21:13 ` pinskia at gcc dot gnu.org
2023-05-10 21:14 ` pinskia at gcc dot gnu.org
2023-05-10 21:16 ` [Bug tree-optimization/109804] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-05-10 21:17 ` pinskia at gcc dot gnu.org
2023-05-10 21:18 ` pinskia at gcc dot gnu.org
2023-05-10 21:48 ` mpolacek at gcc dot gnu.org
2023-05-11  6:30 ` rguenth at gcc dot gnu.org
2023-05-29 10:08 ` jakub at gcc dot gnu.org
2024-02-21  7:23 ` pinskia at gcc dot gnu.org
2024-02-22 17:29 ` cvs-commit at gcc dot gnu.org
2024-02-22 17:30 ` [Bug tree-optimization/109804] [11/12/13 " pinskia at gcc dot gnu.org
2024-02-22 21:13 ` cvs-commit at gcc dot gnu.org
2024-02-22 21:13 ` [Bug tree-optimization/109804] [11/12 " pinskia at gcc dot gnu.org
2024-05-08 17:11 ` cvs-commit at gcc dot gnu.org
2024-05-08 17:16 ` [Bug tree-optimization/109804] [11 " pinskia 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).