aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-03-09 11:23:15 -0500
committerMarek Polacek <polacek@redhat.com>2022-03-10 09:31:34 -0500
commitac8310dd122172bf9d7217e3367da55f9bf9b21b (patch)
tree0a8305611b9ec38fbf3ad7e08755f5b8e18d6fb1 /gcc/fortran
parente46843ff75c37c705811e0c13bb469eda13b5f6c (diff)
downloadgcc-ac8310dd122172bf9d7217e3367da55f9bf9b21b.zip
gcc-ac8310dd122172bf9d7217e3367da55f9bf9b21b.tar.gz
gcc-ac8310dd122172bf9d7217e3367da55f9bf9b21b.tar.bz2
c++: ICE with operator delete [PR104846]
This is an ICE-on-invalid with "auto operator delete[] (void *)" whose return type must be void. The return type is checked in coerce_delete_type but we never got there in this test, because we took the wrong path in grokdeclarator, set type to error_mark_node, ended up creating a FIELD_DECL with build_decl, and confused grokmethod by giving it a FIELD_DECL. Fixed by not taking the data member path for a FUNCTION_TYPE. PR c++/104846 gcc/cp/ChangeLog: * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving data member errors. gcc/testsuite/ChangeLog: * g++.dg/init/delete5.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions