DWARF2 fix for Fortran

Toon Moene toon@moene.indiv.nluug.nl
Tue Oct 31 14:23:00 GMT 2000


Richard Henderson wrote:

> On Tue, Oct 31, 2000 at 11:01:04AM -0800, Mike Stump wrote:
> >       case VAR_DECL:
> >       case COMPONENT_REF:
> >       case COND_EXPR:
> > +     case INDIRECT_REF:
> >         /* ??? These types of bounds can be created by the Ada front end,
> >        and it isn't clear how to emit debug info for them.  */
> >         break;

> A bit of a hack.  Incidentally, it is clear how to emit debug info for
> all of these -- dwarf2 has a fairly comprehensive expression evaluator.

Good.  Thanks a million.  If nothing else helps, read the specs :-)

> I'm currently testing a patch to emit them.

Just in case - to fix g77.f-torture/execute/19981119-0.f you also need
to treat NEGATE_EXPR (quite obvious if you look at the source).

Tested with the following patch on alphaev6-unknown-linux-gnu:

*** dwarf2out.c.orig    Sat Oct 21 11:24:18 2000
--- dwarf2out.c Mon Oct 30 23:50:56 2000
*************** add_bound_info (subrange_die, bound_attr
*** 8110,8115 ****
--- 8110,8121 ----
         and it isn't clear how to emit debug info for them.  */
        break;
  
+     case INDIRECT_REF:
+     case NEGATE_EXPR:
+       /* ??? These types of bounds can be created by the Fortran front
end,
+        and it isn't clear how to emit debug info for them.  */
+       break;
+ 
      default:
        abort ();
      }

Cheers,

[ Sorry - I knew this already yesterday; but I fell asleep over my
  laptop before being able to sent the e-mail off ... ]

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


More information about the Gcc-patches mailing list