public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered
@ 2021-02-15 17:53 gscfq@t-online.de
  2021-02-15 18:00 ` [Bug middle-end/99109] " mpolacek at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: gscfq@t-online.de @ 2021-02-15 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99109
           Summary: [9/10/11 Regression] ICE: Error reporting routines
                    re-entered
           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: ---

Started with r9 between 20180708 and 20180722 at -O2+ :


$ g++-11-20210214 -c pr88619.c -O2 -Wall -fsanitize=undefined
pr88619.c: In function 'int main()':
pr88619.c:13:9: warning: unused variable 'p2' [-Wunused-variable]
   13 |   void *p2 = __builtin_alloca (b);
      |         ^~
pr88619.c:8:1: error: alignment of array elements is greater than element size
    8 | main ()
      | ^~~~
'
Internal compiler error: Error reporting routines re-entered.
0xcd0f36 layout_type(tree_node*)
        ../../gcc/stor-layout.c:2599
0x801cfc build_cplus_array_type(tree_node*, tree_node*, int)
        ../../gcc/cp/tree.c:1110
0x80543c build_cplus_array_type(tree_node*, tree_node*, int)
        ../../gcc/cp/tree.c:1586
0x80543c strip_typedefs(tree_node*, bool*, unsigned int)
        ../../gcc/cp/tree.c:1586
0x6f599b type_to_string
        ../../gcc/cp/error.c:3300
0x6f65d5 cp_printer
        ../../gcc/cp/error.c:4380
0x16f133e pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1475
0x16e52c1 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.c:1244
0x16e597e diagnostic_impl
        ../../gcc/diagnostic.c:1406
0x16e5ea2 warning_at(unsigned int, int, char const*, ...)
        ../../gcc/diagnostic.c:1543
0x1572bfd array_bounds_checker::check_mem_ref(unsigned int, tree_node*, bool)
        ../../gcc/gimple-array-bounds.cc:697
0x15735a9 array_bounds_checker::check_addr_expr(unsigned int, tree_node*)
        ../../gcc/gimple-array-bounds.cc:810
0x15736bf array_bounds_checker::check_array_bounds(tree_node**, int*, void*)
        ../../gcc/gimple-array-bounds.cc:913
0xf64ee5 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ../../gcc/tree.c:12099
0xa6956d walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gimple-walk.c:253
0x156f821 check_array_bounds_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/gimple-array-bounds.cc:966
0x1560724 dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:309
0x1570f4a array_bounds_checker::check()
        ../../gcc/gimple-array-bounds.cc:980
0xf4b099 execute_vrp
        ../../gcc/tree-vrp.c:4517

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
@ 2021-02-15 18:00 ` mpolacek at gcc dot gnu.org
  2021-02-15 18:01 ` mpolacek at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-15 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-02-15
             Status|UNCONFIRMED                 |NEW

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

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
  2021-02-15 18:00 ` [Bug middle-end/99109] " mpolacek at gcc dot gnu.org
@ 2021-02-15 18:01 ` mpolacek at gcc dot gnu.org
  2021-02-15 18:53 ` [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948 jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-15 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.4

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
  2021-02-15 18:00 ` [Bug middle-end/99109] " mpolacek at gcc dot gnu.org
  2021-02-15 18:01 ` mpolacek at gcc dot gnu.org
@ 2021-02-15 18:53 ` jakub at gcc dot gnu.org
  2021-02-15 18:57 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-15 18:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10/11 Regression] ICE:   |[9/10/11 Regression] ICE:
                   |Error reporting routines    |Error reporting routines
                   |re-entered                  |re-entered since r9-1948
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r9-1948-gd893b683f40884cd00b5beb392566ecc7b67f721

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-02-15 18:53 ` [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948 jakub at gcc dot gnu.org
@ 2021-02-15 18:57 ` jakub at gcc dot gnu.org
  2021-02-16  7:26 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-15 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
array_bounds_checker::check_mem_ref certainly shouldn't try to pretend there is
any ARRAY_TYPE that wasn't in the source if the type is overaligned (its size
is not a multiple of the alignment).

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-02-15 18:57 ` jakub at gcc dot gnu.org
@ 2021-02-16  7:26 ` rguenth at gcc dot gnu.org
  2021-02-16 16:36 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-16  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-02-16  7:26 ` rguenth at gcc dot gnu.org
@ 2021-02-16 16:36 ` jakub at gcc dot gnu.org
  2021-02-18  8:46 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-16 16:36 UTC (permalink / raw)
  To: gcc-bugs

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

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 #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50200
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50200&action=edit
gcc11-pr99109.patch

Untested fix.

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

* [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2021-02-16 16:36 ` jakub at gcc dot gnu.org
@ 2021-02-18  8:46 ` cvs-commit at gcc dot gnu.org
  2021-02-18  9:57 ` [Bug middle-end/99109] [9/10 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-18  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:f72e3d8c9ffb81d25d4fdba10056cd2197e22d64

commit r11-7275-gf72e3d8c9ffb81d25d4fdba10056cd2197e22d64
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Feb 18 09:45:19 2021 +0100

    array-bounds: Fix up ICE on overaligned variables [PR99109]

    check_mem_ref builds artificial arrays for variables that don't have
    array type.
    The C standard says:
    "For the purposes of these operators, a pointer to an object that is not an
element of an
    array behaves the same as a pointer to the first element of an array of
length one with the
    type of the object as its element type."
    so it isn't completely wrong and does simplify the function.
    But, layout_type can fail if the size of the element type is not a multiple
    of its alignment (i.e. overaligned types) and we then ICE because of that.

    The following patch uses TYPE_MAIN_VARIANT in those cases instead, but only
    for the types that need it, as for the diagnostics it is better to use the
    typedef names etc. that were really used in the source if possible.

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

            PR middle-end/99109
            * gimple-array-bounds.cc (build_zero_elt_array_type): Rename to ...
            (build_printable_array_type): ... this.  Add nelts argument.  For
            overaligned eltype, use TYPE_MAIN_VARIANT (eltype) instead.  If
            nelts, call build_array_type_nelts.
            (array_bounds_checker::check_mem_ref): Use
build_printable_array_type
            instead of build_zero_elt_array_type and build_array_type_nelts.

            * g++.dg/warn/Warray-bounds-17.C: New test.

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

* [Bug middle-end/99109] [9/10 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2021-02-18  8:46 ` cvs-commit at gcc dot gnu.org
@ 2021-02-18  9:57 ` jakub at gcc dot gnu.org
  2021-06-01  8:19 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-18  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10/11 Regression] ICE:   |[9/10 Regression] ICE:
                   |Error reporting routines    |Error reporting routines
                   |re-entered since r9-1948    |re-entered since r9-1948

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

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

* [Bug middle-end/99109] [9/10 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2021-02-18  9:57 ` [Bug middle-end/99109] [9/10 " jakub at gcc dot gnu.org
@ 2021-06-01  8:19 ` rguenth at gcc dot gnu.org
  2022-05-27  9:44 ` [Bug middle-end/99109] [10 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug middle-end/99109] [10 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2021-06-01  8:19 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:44 ` rguenth at gcc dot gnu.org
  2022-06-28 10:43 ` jakub at gcc dot gnu.org
  2023-07-07  9:24 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug middle-end/99109] [10 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (9 preceding siblings ...)
  2022-05-27  9:44 ` [Bug middle-end/99109] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:43 ` jakub at gcc dot gnu.org
  2023-07-07  9:24 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug middle-end/99109] [10 Regression] ICE: Error reporting routines re-entered since r9-1948
  2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
                   ` (10 preceding siblings ...)
  2022-06-28 10:43 ` jakub at gcc dot gnu.org
@ 2023-07-07  9:24 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.0
         Resolution|---                         |FIXED
      Known to fail|                            |10.5.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.

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

end of thread, other threads:[~2023-07-07  9:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 17:53 [Bug c++/99109] New: [9/10/11 Regression] ICE: Error reporting routines re-entered gscfq@t-online.de
2021-02-15 18:00 ` [Bug middle-end/99109] " mpolacek at gcc dot gnu.org
2021-02-15 18:01 ` mpolacek at gcc dot gnu.org
2021-02-15 18:53 ` [Bug middle-end/99109] [9/10/11 Regression] ICE: Error reporting routines re-entered since r9-1948 jakub at gcc dot gnu.org
2021-02-15 18:57 ` jakub at gcc dot gnu.org
2021-02-16  7:26 ` rguenth at gcc dot gnu.org
2021-02-16 16:36 ` jakub at gcc dot gnu.org
2021-02-18  8:46 ` cvs-commit at gcc dot gnu.org
2021-02-18  9:57 ` [Bug middle-end/99109] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug middle-end/99109] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07  9:24 ` rguenth 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).