Summary: | [11/12 Regression] ICE in output_constructor_regular_field, at varasm.c:5514 since r11-4547-g6fb7e3c29188ab7c | ||
---|---|---|---|
Product: | gcc | Reporter: | G. Steinmetz <gscfq> |
Component: | c++ | Assignee: | Marek Polacek <mpolacek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | marxin, mpolacek, webrown.cpp |
Priority: | P2 | Keywords: | ice-on-invalid-code |
Version: | 12.0 | ||
Target Milestone: | 11.3 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2021-09-21 00:00:00 |
Description
G. Steinmetz
2021-09-21 19:21:29 UTC
Confirmed. Note clang also ICEs :). Started with r11-4547-g6fb7e3c29188ab7c. The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:b1a8b92f8f78536a00012e2e53a0d12ddbe6836d commit r12-6951-gb1a8b92f8f78536a00012e2e53a0d12ddbe6836d Author: Marek Polacek <polacek@redhat.com> Date: Fri Jan 28 20:01:06 2022 -0500 c++: Reject union std::initializer_list [PR102434] Weird things are going to happen if you define your std::initializer_list as a union. In this case, we crash in output_constructor_regular_field. Let's not allow such a definition in the first place. PR c++/102434 gcc/cp/ChangeLog: * class.cc (finish_struct): Don't allow union initializer_list. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist128.C: New test. Fixed. |