re PR c/89045 (ICE in get_parm_info, at c/c-decl.c:7518)
PR c/89045 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter scope. * gcc.dg/pr89045.c: New test. From-SVN: r268349
This commit is contained in:
parent
6a335b9669
commit
f4b7e754cc
|
@ -1,5 +1,9 @@
|
||||||
2019-01-29 Jakub Jelinek <jakub@redhat.com>
|
2019-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c/89045
|
||||||
|
* c-decl.c (build_compound_literal): Don't pushdecl if in parameter
|
||||||
|
scope.
|
||||||
|
|
||||||
PR c/86125
|
PR c/86125
|
||||||
* c-decl.c (last_fileptr_type): Remove.
|
* c-decl.c (last_fileptr_type): Remove.
|
||||||
(last_structptr_types): New variable.
|
(last_structptr_types): New variable.
|
||||||
|
|
|
@ -5528,7 +5528,7 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const,
|
||||||
pushdecl (decl);
|
pushdecl (decl);
|
||||||
rest_of_decl_compilation (decl, 1, 0);
|
rest_of_decl_compilation (decl, 1, 0);
|
||||||
}
|
}
|
||||||
else if (current_function_decl)
|
else if (current_function_decl && !current_scope->parm_flag)
|
||||||
pushdecl (decl);
|
pushdecl (decl);
|
||||||
|
|
||||||
if (non_const)
|
if (non_const)
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
2019-01-29 Jakub Jelinek <jakub@redhat.com>
|
2019-01-29 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c/89045
|
||||||
|
* gcc.dg/pr89045.c: New test.
|
||||||
|
|
||||||
PR c/86125
|
PR c/86125
|
||||||
* gcc.dg/Wbuiltin-declaration-mismatch-7.c: Guard testcase for
|
* gcc.dg/Wbuiltin-declaration-mismatch-7.c: Guard testcase for
|
||||||
lp64, ilp32 and llp64 only.
|
lp64, ilp32 and llp64 only.
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* PR c/89045 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "" } */
|
||||||
|
|
||||||
|
int
|
||||||
|
foo (int x)
|
||||||
|
{
|
||||||
|
int v[(int){ x }];
|
||||||
|
v[0] = 0;
|
||||||
|
int bar (int p[(int){ x }])
|
||||||
|
{
|
||||||
|
return p[0];
|
||||||
|
}
|
||||||
|
return bar (v);
|
||||||
|
}
|
Loading…
Reference in New Issue