re PR c++/84843 (C++ ICE on builtin redefinition since r258391)
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Mar 2018 20:32:54 +0000 (21:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Mar 2018 20:32:54 +0000 (21:32 +0100)
commit949aab190a4ff95d4ba71f55e8b77a2aae61457f
treeaaefa77979ee497fff804571c13117c3c433a5f5
parent515f874faf45628b1b86da81964f2049f7406326
re PR c++/84843 (C++ ICE on builtin redefinition since r258391)

PR c++/84843
* decl.c (duplicate_decls): For redefinition of built-in, use error
and return error_mark_node.  For redeclaration, return error_mark_node
rather than olddecl if !flag_permissive.

* g++.dg/ext/pr84843-1.C: New test.
* g++.dg/ext/pr84843-2.C: New test.

From-SVN: r258503
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/pr84843-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/pr84843-2.C [new file with mode: 0644]