[Bug 108] ICE using @attribute("forceinline")

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Sun Mar 16 02:56:57 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=108

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Looks like the frontend devs changed the behaviours of optimize/interpret,
again.  This'll need adding to the testsuite to catch any future changes.

*PATCH*
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index b0a50a4..a7acb92 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -830,8 +826,10 @@ build_attributes (Expressions *in_attrs)
   for (size_t i = 0; i < in_attrs->dim; i++)
     {
       Expression *attr = (*in_attrs)[i]->optimize (WANTexpand);
-      Dsymbol *sym = attr->type->toDsymbol (0);
+      if (attr->op == TOKcall)
+       attr = attr->ctfeInterpret();

+      Dsymbol *sym = attr->type->toDsymbol (0);
       if (!sym)
        continue;

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140316/5e57c418/attachment.html>


More information about the D.gnu mailing list