(dbxout_parms): Handle invisible ref where decl is a REG
authorCatherine Moore <clm@redhat.com>
Fri, 5 Jan 2001 20:15:24 +0000 (20:15 +0000)
committerCatherine Moore <clm@gcc.gnu.org>
Fri, 5 Jan 2001 20:15:24 +0000 (15:15 -0500)
From-SVN: r38720

gcc/ChangeLog
gcc/dbxout.c

index b9358cbcd6a1a5bc962dce833eddb26d7eeb660c..4b9a3bf1325dd918434276d450ec9379d0f687ab 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-05  Catherine Moore  <clm@redhat.com>
+
+       * dbxout.c ((dbxout_parms): Handle invisible ref where decl is a REG.
+
 2001-01-05  Phil Edwards  <pme@sources.redhat.com>
 
        * cp/lang-options.h:  Bring comment in line with reality.
index c3838dfe9566855fdec954b6a234d6d3c3e47a9b..2d4ea6dd863d0f1acd437b4a78566f9fc3e2af4c 100644 (file)
@@ -2474,12 +2474,16 @@ dbxout_parms (parms)
          {
            /* Parm was passed via invisible reference, with the reference
               living on the stack.  DECL_RTL looks like
-              (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))).  */
+              (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))) or it
+              could look like (MEM (MEM (REG))).  */
            const char *decl_name = (DECL_NAME (parms)
                                     ? IDENTIFIER_POINTER (DECL_NAME (parms))
                                     : "(anon)");
-           current_sym_value
-             = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
+           if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG)
+              current_sym_value = 0;
+           else
+             current_sym_value
+               = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
            current_sym_addr = 0;
              
            FORCE_TEXT;