From: Marek Polacek <polacek@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: Jason Merrill <jason@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4)
Date: Wed, 19 Sep 2018 14:19:00 -0000 [thread overview]
Message-ID: <20180919140518.GN5587@redhat.com> (raw)
In-Reply-To: <mvmlg7xvcup.fsf@suse.de>
On Wed, Sep 19, 2018 at 03:25:02PM +0200, Andreas Schwab wrote:
> I'm getting this ICE on 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
That muset be because ia64 uses TARGET_VTABLE_USES_DESCRIPTORS.
Does this help?
2018-09-19 Marek Polacek <polacek@redhat.com>
* class.c (build_vtbl_initializer): Don't mess with *inits for
TARGET_VTABLE_USES_DESCRIPTORS.
diff --git gcc/cp/class.c gcc/cp/class.c
index 9ca46441871..0239f6ae045 100644
--- gcc/cp/class.c
+++ gcc/cp/class.c
@@ -9370,7 +9370,7 @@ build_vtbl_initializer (tree binfo,
int i;
if (init == size_zero_node)
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
- CONSTRUCTOR_APPEND_ELT (*inits, idx, init);
+ CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, init);
else
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
{
@@ -9378,7 +9378,7 @@ build_vtbl_initializer (tree binfo,
fn, build_int_cst (NULL_TREE, i));
TREE_CONSTANT (fdesc) = 1;
- CONSTRUCTOR_APPEND_ELT (*inits, idx, fdesc);
+ CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc);
}
}
else
next prev parent reply other threads:[~2018-09-19 14:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 17:21 C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions Marek Polacek
2018-09-14 17:41 ` Jakub Jelinek
2018-09-14 19:43 ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v2) Marek Polacek
2018-09-14 20:32 ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions Jason Merrill
2018-09-14 20:46 ` Marek Polacek
2018-09-17 21:51 ` Marek Polacek
2018-09-18 3:48 ` Jason Merrill
2018-09-18 15:37 ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4) Marek Polacek
2018-09-18 18:36 ` Jason Merrill
2018-09-18 18:58 ` Marek Polacek
2018-09-19 13:27 ` Andreas Schwab
2018-09-19 14:19 ` Marek Polacek [this message]
2018-09-19 15:10 ` Andreas Schwab
2018-09-19 15:11 ` Marek Polacek
2018-09-19 17:35 ` Jason Merrill
2018-09-20 8:26 ` Andreas Schwab
2018-09-20 9:23 ` Jakub Jelinek
2018-09-27 7:16 ` Jason Merrill
2018-09-27 23:18 ` Marek Polacek
2018-09-28 5:44 ` Jason Merrill
2018-09-28 6:48 ` Jakub Jelinek
2018-12-08 9:07 ` [C++ PATCH] FIx constexpr virtual function call handling on ia64 (PR c++/87861) Jakub Jelinek
2018-12-11 18:53 ` Jason Merrill
2018-10-08 14:18 ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4) Andreas Schwab
2018-10-10 11:53 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180919140518.GN5587@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).