]> gcc.gnu.org Git - gcc.git/commitdiff
* varasm.c (make_decl_rtl): Fix typo in last change.
authorMark Mitchell <mark@codesourcery.com>
Mon, 15 Jan 2001 04:15:04 +0000 (04:15 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 15 Jan 2001 04:15:04 +0000 (04:15 +0000)
From-SVN: r39026

gcc/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20010112-1.c [new file with mode: 0644]
gcc/varasm.c

index 12d67febc80485f46f8ac4c0ab2e9411978f762d..45e1d59796fa2b3359e853b1373c022b48a583ab 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-12  Mark Mitchell  <mark@codesourcery.com>
+
+       * varasm.c (make_decl_rtl): Fix typo in last change.
+
 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
 
        * defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010112-1.c b/gcc/testsuite/gcc.c-torture/compile/20010112-1.c
new file mode 100644 (file)
index 0000000..69bbe16
--- /dev/null
@@ -0,0 +1,14 @@
+/* Test that putting an initialized variable in a register works. */
+
+#ifdef __i386__
+#define REGISTER asm ("eax")
+#elif defined (__arm__)
+#define REGISTER asm ("r0")
+#else
+/* Put examples for other architectures here. */
+#define REGISTER
+#endif
+
+void f() {
+  register int i REGISTER = 3;
+}
index 928cd14ac327c65efb235fc09d845bd63b0028bc..0cdf138485f812473e8947e17321a890d5eae6ef 100644 (file)
@@ -663,7 +663,7 @@ make_decl_rtl (decl, asmspec)
        {
          int nregs;
 
-         if (DECL_INITIAL (decl) != 0 && !TREE_STATIC (decl))
+         if (DECL_INITIAL (decl) != 0 && TREE_STATIC (decl))
            {
              DECL_INITIAL (decl) = 0;
              error ("global register variable has initial value");
This page took 0.070304 seconds and 5 git commands to generate.