public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172
@ 2022-09-06 17:14 gscfq@t-online.de
  2022-09-07  8:26 ` [Bug c++/106858] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2022-09-06 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106858
           Summary: [12/13 Regression] ICE: tree check: expected tree that
                    contains 'decl common' structure, have 'baselink' in
                    cp_ubsan_maybe_instrument_member_access, at
                    cp/cp-ubsan.cc:172
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20211205 and 20211212 :
(gcc configured with --enable-checking=yes)


$ cat z1.cc
class A {
  void f() {
    #pragma omp target map(this->f)
    ;
  }
};


$ g++-13-20220904 -c z1.cc -fopenmp
$
$ g++-13-20220904 -c z1.cc -fopenmp -fsanitize=undefined
z1.cc: In member function 'void A::f()':
z1.cc:5:3: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'baselink' in
cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172
    5 |   }
      |   ^
0x6fa541 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/tree.cc:9001
0x8a0efc contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3634
0x8a0efc cp_ubsan_maybe_instrument_member_access
        ../../gcc/cp/cp-ubsan.cc:172
0x8a0efc cp_ubsan_check_member_access_r
        ../../gcc/cp/cp-ubsan.cc:231
0x152cac3 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.cc:11247
0x152d35d 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.cc:11370
0x8a140d cp_ubsan_instrument_member_accesses(tree_node**)
        ../../gcc/cp/cp-ubsan.cc:268
0x891bd7 cp_genericize_tree
        ../../gcc/cp/cp-gimplify.cc:1792
0x891d96 cp_genericize(tree_node*)
        ../../gcc/cp/cp-gimplify.cc:1931
0x8eb95f finish_function(bool)
        ../../gcc/cp/decl.cc:18058
0xa20fb3 cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.cc:31480
0xa21358 cp_parser_late_parsing_for_member
        ../../gcc/cp/parser.cc:32444
0x9f25ca cp_parser_class_specifier
        ../../gcc/cp/parser.cc:26399
0x9f3a7c cp_parser_type_specifier
        ../../gcc/cp/parser.cc:19488
0x9f4796 cp_parser_decl_specifier_seq
        ../../gcc/cp/parser.cc:16038
0x9f5411 cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15286
0xa29c2f cp_parser_declaration
        ../../gcc/cp/parser.cc:15099
0xa2a758 cp_parser_translation_unit
        ../../gcc/cp/parser.cc:5068
0xa2a758 c_parse_file()
        ../../gcc/cp/parser.cc:48595
0xbbe741 c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1255

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

* [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
@ 2022-09-07  8:26 ` rguenth at gcc dot gnu.org
  2022-09-07 12:05 ` [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-07  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.3

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

* [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
  2022-09-07  8:26 ` [Bug c++/106858] " rguenth at gcc dot gnu.org
@ 2022-09-07 12:05 ` marxin at gcc dot gnu.org
  2022-09-16 12:44 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-07 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cltang at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
            Summary|[12/13 Regression] ICE:     |[12/13 Regression] ICE:
                   |tree check: expected tree   |tree check: expected tree
                   |that contains 'decl common' |that contains 'decl common'
                   |structure, have 'baselink'  |structure, have 'baselink'
                   |in                          |in
                   |cp_ubsan_maybe_instrument_m |cp_ubsan_maybe_instrument_m
                   |ember_access, at            |ember_access, at
                   |cp/cp-ubsan.cc:172          |cp/cp-ubsan.cc:172 since
                   |                            |r12-5835-g0ab29cf0bb68960c
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-09-07

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5835-g0ab29cf0bb68960c.

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

* [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
  2022-09-07  8:26 ` [Bug c++/106858] " rguenth at gcc dot gnu.org
  2022-09-07 12:05 ` [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c marxin at gcc dot gnu.org
@ 2022-09-16 12:44 ` cvs-commit at gcc dot gnu.org
  2022-10-19  6:07 ` [Bug c++/106858] [12 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-16 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:39dc66558e066e67fd40f21f53cee80989ae742d

commit r13-2696-g39dc66558e066e67fd40f21f53cee80989ae742d
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Sep 15 22:55:50 2022 +0200

    c++: member fn in omp loc list [PR106858]

    this-f names a member function, which isn't an addressable lvalue.  Give a
    helpful error instead of crashing.  The first hunk makes the error range
    cover the whole expression.

            PR c++/106858

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_omp_var_list_no_open): Pass the
            initial token location down.
            * semantics.cc (finish_omp_clauses): Check
            invalid_nonstatic_memfn_p.
            * typeck.cc (invalid_nonstatic_memfn_p): Handle null TREE_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/gomp/map-3.C: New test.

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

* [Bug c++/106858] [12 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-09-16 12:44 ` cvs-commit at gcc dot gnu.org
@ 2022-10-19  6:07 ` rguenth at gcc dot gnu.org
  2022-10-19  6:08 ` rguenth at gcc dot gnu.org
  2023-05-08 12:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19  6:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13 Regression] ICE:     |[12 Regression] ICE: tree
                   |tree check: expected tree   |check: expected tree that
                   |that contains 'decl common' |contains 'decl common'
                   |structure, have 'baselink'  |structure, have 'baselink'
                   |in                          |in
                   |cp_ubsan_maybe_instrument_m |cp_ubsan_maybe_instrument_m
                   |ember_access, at            |ember_access, at
                   |cp/cp-ubsan.cc:172 since    |cp/cp-ubsan.cc:172 since
                   |r12-5835-g0ab29cf0bb68960c  |r12-5835-g0ab29cf0bb68960c
      Known to work|                            |13.0
      Known to fail|                            |12.2.0
           Priority|P3                          |P2

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
fixed on trunk sofar.

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

* [Bug c++/106858] [12 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2022-10-19  6:07 ` [Bug c++/106858] [12 " rguenth at gcc dot gnu.org
@ 2022-10-19  6:08 ` rguenth at gcc dot gnu.org
  2023-05-08 12:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-19  6:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-checking,
                   |                            |ice-on-invalid-code

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
But it's rejected now:

t.ii: In member function 'void A::f()':
t.ii:3:34: error: invalid use of non-static member function 'void A::f()'
    3 |     #pragma omp target map(this->f)
      |                            ~~~~~~^
t.ii:2:8: note: declared here
    2 |   void f() {
      |        ^

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

* [Bug c++/106858] [12 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c
  2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2022-10-19  6:08 ` rguenth at gcc dot gnu.org
@ 2023-05-08 12:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

end of thread, other threads:[~2023-05-08 12:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 17:14 [Bug c++/106858] New: [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 gscfq@t-online.de
2022-09-07  8:26 ` [Bug c++/106858] " rguenth at gcc dot gnu.org
2022-09-07 12:05 ` [Bug c++/106858] [12/13 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'baselink' in cp_ubsan_maybe_instrument_member_access, at cp/cp-ubsan.cc:172 since r12-5835-g0ab29cf0bb68960c marxin at gcc dot gnu.org
2022-09-16 12:44 ` cvs-commit at gcc dot gnu.org
2022-10-19  6:07 ` [Bug c++/106858] [12 " rguenth at gcc dot gnu.org
2022-10-19  6:08 ` rguenth at gcc dot gnu.org
2023-05-08 12:25 ` 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).