dbxout.c (dbxout_symbol_location): Flatten subregs first; don't take REGNO of a non...
authorRichard Henderson <rth@redhat.com>
Fri, 3 Aug 2001 22:24:21 +0000 (15:24 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 3 Aug 2001 22:24:21 +0000 (15:24 -0700)
        * dbxout.c (dbxout_symbol_location): Flatten subregs first;
        don't take REGNO of a non-register.

From-SVN: r44615

gcc/ChangeLog
gcc/dbxout.c

index 06a0e9668a93e60392ca1058fc3eb71c126e1e5f..b2eb17f34aaf6db77cd9c10a2c7a616c6551504a 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-03  Richard Henderson  <rth@redhat.com>
+
+       * dbxout.c (dbxout_symbol_location): Flatten subregs first;
+       don't take REGNO of a non-register.
+
 2001-08-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * gthr-dce.h (__GTHREAD_MUTEX_INIT_FUNCTION and
index 0d330c2265373380ca210e6ace54878ad0e3acb7..4eea7ca82c05a0c5120c721ceb970d1eee2ba028 100644 (file)
@@ -2096,13 +2096,7 @@ dbxout_symbol_location (decl, type, suffix, home)
      If the decl was from an inline function, then its rtl
      is not identically the rtl that was used in this
      particular compilation.  */
-  if (GET_CODE (home) == REG)
-    {
-      regno = REGNO (home);
-      if (regno >= FIRST_PSEUDO_REGISTER)
-       return 0;
-    }
-  else if (GET_CODE (home) == SUBREG)
+  if (GET_CODE (home) == SUBREG)
     {
       rtx value = home;
 
@@ -2113,7 +2107,13 @@ dbxout_symbol_location (decl, type, suffix, home)
          if (REGNO (value) >= FIRST_PSEUDO_REGISTER)
            return 0;
        }
-      regno = REGNO (alter_subreg (home));
+      home = alter_subreg (home);
+    }
+  if (GET_CODE (home) == REG)
+    {
+      regno = REGNO (home);
+      if (regno >= FIRST_PSEUDO_REGISTER)
+       return 0;
     }
 
   /* The kind-of-variable letter depends on where