diff mbox

[sdbout] : Fix PR rtl-optimization/56356

Message ID CAEwic4Z5nSi0265GeUxv-dw3ruVQKL787c8ZtafWTLWiWmpwxQ@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz March 18, 2014, 12:07 p.m. UTC
Hi,

this patch fixes an ICE regarding COFF-debugging information.  Problem is that
the parms isn't necessarily an incoming argument, and not necessarily
already set.
By checking this - as done already in dbxout - we can avoid to process
on invalid
parm-declarations.

ChangeLog

2014-03-18  Kai Tietz  <ktietz@redhat.com>

    PR rtl-optimization/56356
    * sdbout.c (sdbout_parms): Verify that parms'
    incoming argument is valid.
    (sdbout_reg_parms): Likewise.

Regression tested on x86_64-unknown-linux-gnu, x86_64-w64-mingw32, and
i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Comments

Kai Tietz March 18, 2014, 8:05 p.m. UTC | #1
Patch got approved in bug-report for trunk.

Applied at revision 208663 to trunk.

Kai
diff mbox

Patch

Index: sdbout.c
===================================================================
--- sdbout.c    (Revision 208594)
+++ sdbout.c    (Arbeitskopie)
@@ -1229,7 +1229,10 @@  static void
 sdbout_parms (tree parms)
 {
   for (; parms; parms = TREE_CHAIN (parms))
-    if (DECL_NAME (parms))
+    if (DECL_NAME (parms)
+    && TREE_TYPE (parms) != error_mark_node
+    && DECL_RTL_SET_P (parms)
+    && DECL_INCOMING_RTL (parms))
       {
     int current_sym_value = 0;
     const char *name = IDENTIFIER_POINTER (DECL_NAME (parms));
@@ -1361,7 +1364,10 @@  static void
 sdbout_reg_parms (tree parms)
 {
   for (; parms; parms = TREE_CHAIN (parms))
-    if (DECL_NAME (parms))
+    if (DECL_NAME (parms)
+        && TREE_TYPE (parms) != error_mark_node
+        && DECL_RTL_SET_P (parms)
+        && DECL_INCOMING_RTL (parms))
       {
     const char *name = IDENTIFIER_POINTER (DECL_NAME (parms));