public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671
@ 2020-11-29 19:38 foss at grueninger dot de
  2020-11-30  8:11 ` [Bug c++/98054] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: foss at grueninger dot de @ 2020-11-29 19:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98054
           Summary: ICE: in pp_cxx_trait_expression, at
                    cp/cxx-pretty-print.c:2671
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: foss at grueninger dot de
  Target Milestone: ---

Created attachment 49646
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49646&action=edit
Dumped file with -save-temps

When compiling a C++ project with G++11, that works fine with G++ 10 and
Clang++, I get the following output:

In file included from
/home/kiko/dune/complete/dune-functions/dune/functions/common/test/polymorphicsmallobjecttest.cc:7:
/home/kiko/dune/complete/dune-functions/dune/functions/common/polymorphicsmallobject.hh:
In instantiation of ‘class Dune::Functions::PolymorphicSmallObject<Base, 0>’:
/usr/include/c++/11/type_traits:971:25:   in pp_cxx_trait_expression, at
cp/cxx-pretty-print.c:2671
   44 | class PolymorphicSmallObject
      |       ^~~~~~~~~~~~~~~~~~~~~~
0x7f4b1a4c4349 __libc_start_main
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.opensuse.org/> for instructions.

More details regarding my G++ 11:
>g++-11 -v
Using built-in specs.
COLLECT_GCC=g++-11
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d
--enable-offload-targets=nvptx-none=/usr/nvptx-none,amdgcn-amdhsa=/usr/amdgcn-amdhsa,
--without-cuda-driver --enable-checking=release --disable-werror
--with-gxx-include-dir=/usr/include/c++/11 --enable-ssp --disable-libssp
--disable-libvtv --enable-cet=auto --disable-libcc1 --disable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-libphobos
--enable-version-specific-runtime-libs --with-gcc-major-version-only
--enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function
--program-suffix=-11 --without-system-libunwind --enable-multilib
--with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux
--host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201127 (experimental) [revision
67138ea1b041fe1637da6b3568f064f172d9358c] (SUSE Linux)

== How to reproduce ==
With -save-temps I dumped the file and attached it. With the following command
line, I can reproduce the problem:
> /usr/bin/g++-11 -DENABLE_MPI=1 -DENABLE_SUITESPARSE=1 -DENABLE_SUPERLU=1 -DENABLE_TBB=1 -DENABLE_UG=1 -DHAVE_CONFIG_H -DMETIS_API_VERSION=5 -DMPICH_SKIP_MPICXX -DMPIPP_H -DMPI_NO_CPPBIND -DModelP -DOMPI_SKIP_MPICXX -DUG_USE_NEW_DIMENSION_DEFINES -D_TBB_CPP0X -I/home/kiko/dune/complete/dune-functions/build-cmake -I/home/kiko/dune/complete/dune-functions -I/usr/include/python3.6m -I/home/kiko/dune/complete/dune-common -I/home/kiko/dune/complete/dune-uggrid -I/home/kiko/dune/complete/dune-geometry -I/home/kiko/dune/complete/dune-grid -I/home/kiko/dune/complete/dune-typetree -I/home/kiko/dune/complete/dune-istl -I/home/kiko/dune/complete/dune-localfunctions -isystem /usr/lib64/mpi/gcc/openmpi/include -isystem /usr/include/suitesparse -isystem /home/kiko/dune/zusatz/parmetis-4.0.3/include -isystem /home/kiko/dune/zusatz/metis-5.1.0/include -std=c++17  -Wall -Wunused -Wmissing-include-dirs -Wcast-align -Wno-sign-compare -Wno-cast-align -Wall -pedantic -Wno-inconsistent-missing-override -O2 -Wno-unused-parameter -fno-strict-aliasing -fstrict-overflow -g -fPIE -pthread -o CMakeFiles/polymorphicsmallobjecttest.dir/polymorphicsmallobjecttest.cc.o -c polymorphicsmallobjecttest.cc.ii

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
@ 2020-11-30  8:11 ` rguenth at gcc dot gnu.org
  2020-11-30  8:32 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-30  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
            Summary|ICE: in                     |[11 Regression] ICE: in
                   |pp_cxx_trait_expression, at |pp_cxx_trait_expression, at
                   |cp/cxx-pretty-print.c:2671  |cp/cxx-pretty-print.c:2671

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
  2020-11-30  8:11 ` [Bug c++/98054] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-11-30  8:32 ` marxin at gcc dot gnu.org
  2020-11-30  9:03 ` [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3 marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-11-30

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, thank you for the report.
I'm reducing that..

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
  2020-11-30  8:11 ` [Bug c++/98054] [11 Regression] " rguenth at gcc dot gnu.org
  2020-11-30  8:32 ` marxin at gcc dot gnu.org
@ 2020-11-30  9:03 ` marxin at gcc dot gnu.org
  2020-11-30  9:23 ` ville.voutilainen at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-30  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.0
            Summary|[11 Regression] ICE: in     |[11 Regression] ICE: in
                   |pp_cxx_trait_expression, at |pp_cxx_trait_expression, at
                   |cp/cxx-pretty-print.c:2671  |cp/cxx-pretty-print.c:2671
                   |                            |since
                   |                            |r11-4386-g9e2256dcd481ffe3
                 CC|                            |ville.voutilainen at gmail dot com

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-4386-g9e2256dcd481ffe3, before the revision it was rejected.
Reduced test-case:

$ cat polymorphicsmallobjecttest.cc.ii
struct integral_constant {};
template <bool> using __bool_constant = integral_constant;
template <typename _Tp, typename _Up>
using __is_nothrow_assignable_impl =
    __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
template <typename _Tp>
struct __is_nt_move_assignable_impl : __is_nothrow_assignable_impl<_Tp, _Tp>
{};
template <int _Len> struct aligned_storage {
  struct type {
    char __data[_Len];
  };
};
template <long _Len>
using aligned_storage_t = typename aligned_storage<_Len>::type;
template <int bufferSize> class PolymorphicSmallObject {
  aligned_storage_t<bufferSize> buffer_;
};
template <class Obj> void test() { __is_nt_move_assignable_impl<Obj> value; }
int main() { test<PolymorphicSmallObject<0>>; return 0; }

$ g++ polymorphicsmallobjecttest.cc.ii -c
$ g++ polymorphicsmallobjecttest.cc.ii -c -pedantic
‘
polymorphicsmallobjecttest.cc.ii: In instantiation of ‘struct
aligned_storage<0>::type’:
polymorphicsmallobjecttest.cc.ii:16:33:   required from ‘class
PolymorphicSmallObject<0>’
polymorphicsmallobjecttest.cc.ii:5:21:   in pp_cxx_trait_expression, at
cp/cxx-pretty-print.c:2671
   10 |     char __data[_Len];
      |          ^~~~~~
0x65210c pp_cxx_trait_expression(cxx_pretty_printer*, tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/cxx-pretty-print.c:2671
0x9949ea dump_template_parms
        /home/marxin/Programming/gcc/gcc/cp/error.c:1945
0x996c3a subst_to_string
        /home/marxin/Programming/gcc/gcc/cp/error.c:3369
0x996c3a cp_printer
        /home/marxin/Programming/gcc/gcc/cp/error.c:4361
0x1b72e3c pp_format(pretty_printer*, text_info*)
        /home/marxin/Programming/gcc/gcc/pretty-print.c:1475
0x1b74ec0 pp_format_verbatim(pretty_printer*, text_info*)
        /home/marxin/Programming/gcc/gcc/pretty-print.c:1536
0x1b74ec0 pp_verbatim(pretty_printer*, char const*, ...)
        /home/marxin/Programming/gcc/gcc/pretty-print.c:1790
0x98c3ac print_instantiation_partial_context_line
        /home/marxin/Programming/gcc/gcc/cp/error.c:3596
0x98c3ac print_instantiation_partial_context
        /home/marxin/Programming/gcc/gcc/cp/error.c:3705
0x98c3ac print_instantiation_full_context
        /home/marxin/Programming/gcc/gcc/cp/error.c:3585
0x99791a maybe_print_instantiation_context
        /home/marxin/Programming/gcc/gcc/cp/error.c:3722
0x99791a cp_diagnostic_starter
        /home/marxin/Programming/gcc/gcc/cp/error.c:3413
0x1b56c7a diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1217
0x1b59338 diagnostic_impl
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1366
0x1b59338 pedwarn(unsigned int, int, char const*, ...)
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1599
0x94d269 compute_array_index_type_loc
        /home/marxin/Programming/gcc/gcc/cp/decl.c:10512
0xa69a70 tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:15842
0xa54b1f tsubst_decl
        /home/marxin/Programming/gcc/gcc/cp/pt.c:14475
0xa81ead instantiate_class_template_1
        /home/marxin/Programming/gcc/gcc/cp/pt.c:11959
0xa830f2 instantiate_class_template(tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:12196
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
                   ` (2 preceding siblings ...)
  2020-11-30  9:03 ` [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3 marxin at gcc dot gnu.org
@ 2020-11-30  9:23 ` ville.voutilainen at gmail dot com
  2020-11-30 11:20 ` ville.voutilainen at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-11-30  9:23 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ville.voutilainen at gmail dot com
             Status|NEW                         |ASSIGNED

--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Whoops, I need to add the handling of the new intrinsics into
pp_cxx_trait_expression. This should be quite straightforward, stay tuned...

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
                   ` (3 preceding siblings ...)
  2020-11-30  9:23 ` ville.voutilainen at gmail dot com
@ 2020-11-30 11:20 ` ville.voutilainen at gmail dot com
  2020-12-01 22:24 ` cvs-commit at gcc dot gnu.org
  2020-12-01 22:24 ` ville.voutilainen at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-11-30 11:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Patch at https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560591.html

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
                   ` (4 preceding siblings ...)
  2020-11-30 11:20 ` ville.voutilainen at gmail dot com
@ 2020-12-01 22:24 ` cvs-commit at gcc dot gnu.org
  2020-12-01 22:24 ` ville.voutilainen at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 22:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ville Voutilainen <ville@gcc.gnu.org>:

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

commit r11-5629-gbec21c625d50276651410452e792718d228cfb5c
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date:   Wed Dec 2 00:20:46 2020 +0200

    Add pretty-printing support for __is_nothrow_{assignable,constructible}.

    gcc/cp/ChangeLog:

            PR c++/98054
            * cxx-pretty-print.c (pp_cxx_trait_expression):
            Add support for __is_nothrow_{assignable,constructible}.

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

* [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3
  2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
                   ` (5 preceding siblings ...)
  2020-12-01 22:24 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 22:24 ` ville.voutilainen at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ville.voutilainen at gmail dot com @ 2020-12-01 22:24 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Fixed.

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

end of thread, other threads:[~2020-12-01 22:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29 19:38 [Bug c++/98054] New: ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 foss at grueninger dot de
2020-11-30  8:11 ` [Bug c++/98054] [11 Regression] " rguenth at gcc dot gnu.org
2020-11-30  8:32 ` marxin at gcc dot gnu.org
2020-11-30  9:03 ` [Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3 marxin at gcc dot gnu.org
2020-11-30  9:23 ` ville.voutilainen at gmail dot com
2020-11-30 11:20 ` ville.voutilainen at gmail dot com
2020-12-01 22:24 ` cvs-commit at gcc dot gnu.org
2020-12-01 22:24 ` ville.voutilainen at gmail dot com

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).