re PR c/79730 (ICE tree check: expected var_decl, have function_decl in finish_decl, at c/c-decl.c:5063)
PR c/79730 * c-decl.c (finish_decl): Check VAR_P. * gcc.dg/pr79730.c: New test. From-SVN: r246578
This commit is contained in:
parent
fdc54f39c1
commit
10fa8dfb3a
|
@ -1,3 +1,8 @@
|
|||
2017-03-29 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/79730
|
||||
* c-decl.c (finish_decl): Check VAR_P.
|
||||
|
||||
2017-03-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/80162
|
||||
|
|
|
@ -5066,7 +5066,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
|
|||
when a tentative file-scope definition is seen.
|
||||
But at end of compilation, do output code for them. */
|
||||
DECL_DEFER_OUTPUT (decl) = 1;
|
||||
if (asmspec && C_DECL_REGISTER (decl))
|
||||
if (asmspec && VAR_P (decl) && C_DECL_REGISTER (decl))
|
||||
DECL_HARD_REGISTER (decl) = 1;
|
||||
rest_of_decl_compilation (decl, true, 0);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2017-03-29 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/79730
|
||||
* gcc.dg/pr79730.c: New test.
|
||||
|
||||
2017-03-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/78670
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/* PR c/79730 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-std=gnu11" } */
|
||||
|
||||
register int x() asm (""); /* { dg-error "invalid storage class" } */
|
||||
register float y() asm (""); /* { dg-error "invalid storage class" } */
|
Loading…
Reference in New Issue