[Bug c++/87861] New: [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] New: [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

            Bug ID: 87861
           Summary: [9 regression] ICE in
                    output_constructor_regular_field, at varasm.c:5165
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: build, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [hidden email]
                CC: polacek at redhat dot com
  Target Milestone: ---
            Target: ia64-*-*

libtool: compile:  /usr/local/gcc/gcc-20180919/Build/./gcc/xgcc -shared-libgcc
-B/usr/local/gcc/gcc-20180919/Build/./gcc -nostdinc++
-L/usr/local/gcc/gcc-20180919/Build/ia64-suse-linux/libstdc++-v3/src
-L/usr/local/gcc/gcc-20180919/Build/ia64-suse-linux/libstdc++-v3/src/.libs
-L/usr/local/gcc/gcc-20180919/Build/ia64-suse-linux/libstdc++-v3/libsupc++/.libs
-B/usr/ia64-suse-linux/bin/ -B/usr/ia64-suse-linux/lib/ -isystem
/usr/ia64-suse-linux/include -isystem /usr/ia64-suse-linux/sys-include
-fno-checking -I/usr/local/gcc/gcc-20180919/libstdc++-v3/../libgcc
-I/usr/local/gcc/gcc-20180919/Build/ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux
-I/usr/local/gcc/gcc-20180919/Build/ia64-suse-linux/libstdc++-v3/include
-I/usr/local/gcc/gcc-20180919/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=bad_typeid.lo -O2 -g -D_GNU_SOURCE -c
../../../../libstdc++-v3/libsupc++/bad_typeid.cc  -fPIC -DPIC -D_GLIBCXX_SHARED
-o bad_typeid.o
../../../../libstdc++-v3/libsupc++/bad_typeid.cc:36:1: internal compiler error:
in output_constructor_regular_field, at varasm.c:5165
36 | } // namespace std
   | ^
0x400000000176abaf output_constructor_regular_field
        ../../gcc/varasm.c:5165
0x400000000176d09f output_constructor
        ../../gcc/varasm.c:5475
0x400000000176940f output_constant
        ../../gcc/varasm.c:4967
0x400000000175414f assemble_variable_contents
        ../../gcc/varasm.c:2143
0x400000000175586f assemble_variable(tree_node*, int, int, int)
        ../../gcc/varasm.c:2319
0x40000000017a564f varpool_node::assemble_decl()
        ../../gcc/varpool.c:586
0x40000000017a74cf symbol_table::output_variables()
        ../../gcc/varpool.c:752
0x40000000007b806f symbol_table::compile()
        ../../gcc/cgraphunit.c:2611
0x40000000007bd8ef symbol_table::compile()
        ../../gcc/cgraphunit.c:2791
0x40000000007bd8ef symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.c:2788

(gdb) up
#1  0x400000000176abb0 in output_constructor_regular_field (
    local=0x600ffffffffee920) at ../../gcc/varasm.c:5165
5165            gcc_assert (fieldpos == local->total_bytes);
(gdb) p fieldpos
$1 = 16
(gdb) p local->total_bytes
$2 = 24
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.0
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
When did this start?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
It's unlikely that this is caused by my latest patch implementing P0846R0, that
only triggers with C++2a.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-12-06
                 CC|                            |law at redhat dot com
     Ever confirmed|0                           |1
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Could you please attach preprocessed source on which you get this ICE?
Thanks.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 45178
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45178&action=edit
gcc9-ia64-constexpr-virtual.patch

Here is untested patch to fix all g++.dg/cpp2a/constexpr-virtual*.C failures,
not sure if it is related or not.
I don't have access to ia64 so can't really test this.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45178|0                           |1
        is obsolete|                            |

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 45182
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45182&action=edit
gcc9-pr87861.patch

Updated patch, so that it doesn't fail to compile due to warning on non-ia64.

Andreas, could you please bootstrap/regtest this?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
I've still got my ia64 beaker box from yesterday provisioned.  I'll spin your
patch.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #8 from Jeffrey A. Law <law at redhat dot com> ---
We certainly get further with your patch -- we fail qsort checking during the
stage2 build, but that's nothing new.  ia64 has run afoul of the qsort checking
since the day qsort checking was introduced.  I'll hack around it and let the
bootstrap continue.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #9 from Jeffrey A. Law <law at redhat dot com> ---
Jakub -- with your patch and qsort checking hacked off I got a successful ia64
bootstrap.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Dec 11 20:37:53 2018
New Revision: 267032

URL: https://gcc.gnu.org/viewcvs?rev=267032&root=gcc&view=rev
Log:
        PR c++/87861
        * class.c (build_vtbl_initializer): For TARGET_VTABLE_USES_DESCRIPTORS
        bump index for each added word.
        * constexpr.c (find_array_ctor_elt): Add forward declaration.
        (cxx_eval_call_expression): Handle TARGET_VTABLE_USES_DESCRIPTORS
        vtable calls.
        (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Divide token
        by TARGET_VTABLE_USES_DESCRIPTORS if non-zero.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/constexpr.c
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87861] [9 regression] ICE in output_constructor_regular_field, at varasm.c:5165

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87861

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.