PR c/79730
* c-decl.c (finish_decl): Check VAR_P.
* gcc.dg/pr79730.c: New test.
From-SVN: r246578
+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
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);
}
+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
--- /dev/null
+/* 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" } */