re PR c++/88636 (ICE: Segmentation fault (in c_tree_chain_next))

PR c++/88636
	* decl.c (builtin_function_1): Return result of pushdecl_top_level
	or pushdecl rather than decl.

	* g++.target/i386/pr88636.C: New test.

From-SVN: r267548
This commit is contained in:
Jakub Jelinek 2019-01-03 11:11:40 +01:00 committed by Jakub Jelinek
parent 7dae295006
commit cc3dac976e
4 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2019-01-03 Jakub Jelinek <jakub@redhat.com>
PR c++/88636
* decl.c (builtin_function_1): Return result of pushdecl_top_level
or pushdecl rather than decl.
2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
* tree.c (handle_nodiscard_attribute): Improve warning location.

View File

@ -4536,11 +4536,9 @@ builtin_function_1 (tree decl, tree context, bool is_global)
}
if (is_global)
pushdecl_top_level (decl);
return pushdecl_top_level (decl);
else
pushdecl (decl);
return decl;
return pushdecl (decl);
}
tree

View File

@ -1,3 +1,8 @@
2019-01-03 Jakub Jelinek <jakub@redhat.com>
PR c++/88636
* g++.target/i386/pr88636.C: New test.
2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp1z/nodiscard3.C: Test locations too.

View File

@ -0,0 +1,6 @@
// PR c++/88636
// { dg-do compile }
// { dg-options "-msse2 -mno-sse3 -fno-exceptions --param ggc-min-heapsize=0" }
extern unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int);
#pragma GCC target("sse4.2")