re PR c++/78890 (ICE on invalid reference type in union)
authorJakub Jelinek <jakub@redhat.com>
Thu, 5 Jan 2017 21:12:02 +0000 (22:12 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 5 Jan 2017 21:12:02 +0000 (22:12 +0100)
commit962c5679b3c61f09b96ab72e474a897b870fd2c1
tree4db3ac6174fe412ca90022d363d42e2dcfeb5ba5
parent8c15f541f3e9835facb5afaa994887de48ed4b78
re PR c++/78890 (ICE on invalid reference type in union)

PR c++/78890
* class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
unions even for C++11 and later.

* g++.dg/init/ref14.C: Expect error even in C++11 and later.
* g++.dg/init/union1.C: Likewise.
* g++.dg/cpp0x/union6.C: Expect errors.
* g++.dg/cpp0x/union8.C: New test.
* g++.dg/cpp0x/pr78890-1.C: New test.
* g++.dg/cpp0x/pr78890-2.C: New test.

From-SVN: r244112
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr78890-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/pr78890-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/union6.C
gcc/testsuite/g++.dg/cpp0x/union8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/ref14.C
gcc/testsuite/g++.dg/init/union1.C