Commit c07c7c9d by J"orn Rennecke Committed by Joern Rennecke

regclass.c (globalize_reg): Re-instate test that allows fixed registers to be…

regclass.c (globalize_reg): Re-instate test that allows fixed registers to be declared as a variable even...

	* regclass.c (globalize_reg): Re-instate test that allows
	fixed registers to be declared as a variable even after functions
	are defined.

	* testsuite/gcc.dg/991209-1.c: New test.

From-SVN: r30853
parent 309ada50
Fri Dec 10 00:53:10 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* regclass.c (globalize_reg): Re-instate test that allows
fixed registers to be declared as a variable even after functions
are defined.
Fri Dec 10 00:52:13 MET 1999 Jan Hubicka <hubicka@freesoft.cz> Fri Dec 10 00:52:13 MET 1999 Jan Hubicka <hubicka@freesoft.cz>
* i386.md (cpu attribute): Add "athlon". * i386.md (cpu attribute): Add "athlon".
......
...@@ -218,7 +218,7 @@ struct reg_info_data { ...@@ -218,7 +218,7 @@ struct reg_info_data {
static struct reg_info_data *reg_info_head; static struct reg_info_data *reg_info_head;
/* No more global register vairiables may be declared; true once /* No more global register variables may be declared; true once
regclass has been initialized. */ regclass has been initialized. */
static int no_global_reg_vars = 0; static int no_global_reg_vars = 0;
...@@ -630,7 +630,7 @@ void ...@@ -630,7 +630,7 @@ void
globalize_reg (i) globalize_reg (i)
int i; int i;
{ {
if (no_global_reg_vars) if (fixed_regs[i] == 0 && no_global_reg_vars)
error ("global register variable follows a function definition"); error ("global register variable follows a function definition");
if (global_regs[i]) if (global_regs[i])
...@@ -767,7 +767,7 @@ regclass_init () ...@@ -767,7 +767,7 @@ regclass_init ()
before regclass is run. */ before regclass is run. */
reg_pref = NULL; reg_pref = NULL;
/* No more global register vairiables may be declared. */ /* No more global register variables may be declared. */
no_global_reg_vars = 1; no_global_reg_vars = 1;
} }
......
Fri Dec 10 00:53:10 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* gcc.dg/991209-1.c: New test.
Wed Dec 8 23:44:08 1999 Nathan Sidwell <nathan@acm.org> Wed Dec 8 23:44:08 1999 Nathan Sidwell <nathan@acm.org>
* gcc.c-torture/compile/991208-1.c: New test. * gcc.c-torture/compile/991208-1.c: New test.
......
/* { dg-do compile { target i386-*-* } } */
int foo ()
{
return 1;
}
register char *stack_ptr asm ("%esp");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment