mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 01:40:39 +08:00
re PR middle-end/64766 (internal compiler error: tree check: expected block, have error_mark in lower_function_body, at gimple-low.c:122)
PR c/64766 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL of FUNCTION_DECLs with error_mark_node. * gcc.dg/pr64766.c: New test. From-SVN: r220152
This commit is contained in:
parent
1230f784cf
commit
dea63e49fa
@ -1,3 +1,9 @@
|
||||
2015-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/64766
|
||||
* c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
|
||||
of FUNCTION_DECLs with error_mark_node.
|
||||
|
||||
2015-01-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/64778
|
||||
|
@ -6422,7 +6422,8 @@ store_init_value (location_t init_loc, tree decl, tree init, tree origtype)
|
||||
warning (OPT_Wtraditional, "traditional C rejects automatic "
|
||||
"aggregate initialization");
|
||||
|
||||
DECL_INITIAL (decl) = value;
|
||||
if (value != error_mark_node || TREE_CODE (decl) != FUNCTION_DECL)
|
||||
DECL_INITIAL (decl) = value;
|
||||
|
||||
/* ANSI wants warnings about out-of-range constant initializers. */
|
||||
STRIP_TYPE_NOPS (value);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2015-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/64766
|
||||
* gcc.dg/pr64766.c: New test.
|
||||
|
||||
2015-01-26 Oleg Endo <olegendo@gcc.gnu.org>
|
||||
|
||||
PR target/49263
|
||||
|
9
gcc/testsuite/gcc.dg/pr64766.c
Normal file
9
gcc/testsuite/gcc.dg/pr64766.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* PR c/64766 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
}
|
||||
|
||||
void foo () = 0; /* { dg-error "is initialized like a variable|invalid initializer" } */
|
Loading…
x
Reference in New Issue
Block a user