PR middle-end/23125
* decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
instead of change_decl_assembler_name.
2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23125
* c-decl.c (finish_decl): Use set_user_assembler_name even for
register variables.
* varasm.c (make_decl_rtl): If a register variable does not
have a set user assmbler name, error out.
Decode the asmspec is now name+1 bypassing '*'.
2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23125
* gcc.dg/register-var-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104942
138bc75d-0d04-0410-961f-
82ee72b054a4
-2005-10-05 Steven Bosscher <stevenb@suse.de>
+2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/23125
+ * c-decl.c (finish_decl): Use set_user_assembler_name even for
+ register variables.
+ * varasm.c (make_decl_rtl): If a register variable does not
+ have a set user assmbler name, error out.
+ Decode the asmspec is now name+1 bypassing '*'.
+
+2005-10-04 Steven Bosscher <stevenb@suse.de>
PR tree-optimization/23049
* tree-ssa-dom.c (thread_across_edge): Make sure that the condition
&& !TREE_STATIC (decl))
warning (0, "ignoring asm-specifier for non-static local "
"variable %q+D", decl);
- else if (C_DECL_REGISTER (decl))
- change_decl_assembler_name (decl, get_identifier (asmspec));
else
set_user_assembler_name (decl, asmspec);
}
+2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/23125
+ * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
+ instead of change_decl_assembler_name.
+
2005-10-03 Alexandre Oliva <aoliva@redhat.com>
* error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
placed in a particular register. */
if (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
{
- change_decl_assembler_name (decl, get_identifier (asmspec));
+ set_user_assembler_name (decl, asmspec);
DECL_HARD_REGISTER (decl) = 1;
}
else
-2005-10-05 Steven Bosscher <stevenb@suse.de>
+2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR middle-end/23125
+ * gcc.dg/register-var-3.c: New test.
+
+2005-10-04 Steven Bosscher <stevenb@suse.de>
* gcc.dg/pr23049.c: New test.
--- /dev/null
+/* { dg-options "" } */
+/* { dg-do compile } */
+register int r0; /* { dg-error "register name not specified" } */
+register int bp; /* { dg-error "register name not specified" } */
+register int sp; /* { dg-error "register name not specified" } */
+register int r30; /* { dg-error "register name not specified" } */
+register int toc; /* { dg-error "register name not specified" } */
+register int d0; /* { dg-error "register name not specified" } */
+register int a0; /* { dg-error "register name not specified" } */
}
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
- if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
+
+ if (name[0] != '*' && TREE_CODE (decl) != FUNCTION_DECL
+ && DECL_REGISTER (decl))
+ {
+ error ("register name not specified for %q+D", decl);
+ }
+ else if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{
- reg_number = decode_reg_name (name);
+ const char *asmspec = name+1;
+ reg_number = decode_reg_name (asmspec);
/* First detect errors in declaring global registers. */
if (reg_number == -1)
error ("register name not specified for %q+D", decl);