diff options
author | Marek Polacek <polacek@redhat.com> | 2017-03-29 23:40:36 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2017-03-29 23:40:36 +0000 |
commit | 10fa8dfb3a13443006563fd14af64d4751ebb7fb (patch) | |
tree | 1c069a1e89c0764fd7e7f9da20332dc1192350bd /gcc/c/c-decl.c | |
parent | fdc54f39c14aa7fc3820853bf8deee8e02401a55 (diff) | |
download | gcc-10fa8dfb3a13443006563fd14af64d4751ebb7fb.zip gcc-10fa8dfb3a13443006563fd14af64d4751ebb7fb.tar.gz gcc-10fa8dfb3a13443006563fd14af64d4751ebb7fb.tar.bz2 |
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
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index a0dc5bc..53c390c 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -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); } |