[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

--- Comment #7 from Martin Sebor  ---
On second thought, either decl_attributes() (or maybe even
handle_access_attribute()) could arrange to add the internal, condensed form of
the attributes to the function type without modifying the "expanded"
(human-readable) attributes.  That would preserve the "optimization" (although
I'm not sure how much using the condensed form gains over the expanded form).

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

--- Comment #6 from Martin Sebor  ---
I suspect the ICE is caused by handle_access_attribute() modifying the
attributes of the passed-in function type.  This is done because the attribute
is internally represented in a condensed form to speed up processing.  I can't
think of a way to avoid it except to revert the internal representation to the
original (uncondensed) form.

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

Martin Sebor  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED

--- Comment #5 from Martin Sebor  ---
Thanks, I see it now with --enable-checking=yes (I had
--enable-checking=release).  Let me look into it.

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-20 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

--- Comment #4 from Arseny Solokha  ---
And also on Compiler Explorer[1], which means it's not (solely) my
misconfiguration.

[1] https://gcc.godbolt.org/z/A8b--q

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-20 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

Arseny Solokha  changed:

   What|Removed |Added

 Target||x86_64-unknown-linux
 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #3 from Arseny Solokha  ---
(In reply to Martin Sebor from comment #2)
> If it's still reproducible for you

It is, w/ the checking build.

> please reopen
> the bug and provide some more details (options, target, etc.) to help
> reproduce it.

% x86_64-unknown-linux-gnu-g++-10.0.0-alpha20200119 -v -c
gcc/testsuite/gcc.dg/attr-access-read-write-2.c
Using built-in specs.
COLLECT_GCC=x86_64-unknown-linux-gnu-g++-10.0.0-alpha20200119
Target: x86_64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200119/work/gcc-10-20200119/configure
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/10.0.0-alpha20200119
--includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include
--datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/10.0.0-alpha20200119
--mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/man
--infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include/g++-v10
--with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --enable-checking=yes --disable-esp
--enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --with-multilib-list=m64 --disable-altivec
--disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-systemtap
--disable-vtable-verify --disable-libvtv --disable-libquadmath --enable-lto
--with-isl --disable-isl-version-check --disable-libsanitizer
--enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.0.0-alpha20200119 20200119 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/cc1plus -quiet
-v -D_GNU_SOURCE gcc/testsuite/gcc.dg/attr-access-read-write-2.c -quiet
-dumpbase attr-access-read-write-2.c -mtune=generic -march=x86-64 -auxbase
attr-access-read-write-2 -version -o /tmp/cc6IE8Ii.s
GNU C++14 (GCC) version 10.0.0-alpha20200119 20200119 (experimental)
(x86_64-unknown-linux-gnu)
compiled by GNU C version 10.0.0-alpha20200119 20200119 (experimental),
GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version
isl-0.22-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include/g++-v10

/usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include/g++-v10/x86_64-unknown-linux-gnu

/usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include/g++-v10/backward
 /usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/10.0.0-alpha20200119/include-fixed
 /usr/include
End of search list.
GNU C++14 (GCC) version 10.0.0-alpha20200119 20200119 (experimental)
(x86_64-unknown-linux-gnu)
compiled by GNU C version 10.0.0-alpha20200119 20200119 (experimental),
GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version
isl-0.22-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 403404e908002a68c47877ce00919be1
gcc/testsuite/gcc.dg/attr-access-read-write-2.c:13:44: internal compiler error:
canonical types differ for identical types 'int(void*, void*)' and 'int(void*,
void*)'
   13 | int RW (2) RW (2) rdwr1_rdwr1 (void*, void*);
  |^
0xa5b4e7 comptypes(tree_node*, tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200119/work/gcc-10-20200119/gcc/cp/typeck.c:1512
0x8ea1d8 duplicate_decls(tree_node*, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200119/work/gcc-10-20200119/gcc/cp/decl.c:2306
0x96ae10 do_pushdecl
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20200119/work/gcc-10-20200119/gcc/cp/name-lookup.c:3042
0x96dc52 pushdecl(tree_node*, bool)
   

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2020-01-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Martin Sebor  ---
I can't reproduce this ICE, either with the test or with the small test case,
either in C++ or C.  If it's still reproducible for you please reopen the bug
and provide some more details (options, target, etc.) to help reproduce it.

[Bug c++/92721] ICE: canonical types differ for identical types 'int(void*, void*)' and 'int(void*, void*)'

2019-11-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92721

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-11-29
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
   Target Milestone|--- |10.0
 Ever confirmed|0   |1
  Known to fail||10.0

--- Comment #1 from Martin Liška  ---
Confirmed, started with r278624.