Iain Buclaw avatar Iain Buclaw committed 3da4532

Issue #268 - ICE with -flto and -g

Comments (0)

Files changed (1)

     DECL_INITIAL(our_mod_ref) = init;
     g.ofile->rodc(our_mod_ref, 1);
 
-    tree the_mod_ref = d_build_decl(VAR_DECL, get_identifier("_Dmodule_ref"),
-        build_pointer_type(mod_ref_type));
+    tree the_mod_ref = d_build_decl_loc(BUILTINS_LOCATION, VAR_DECL,
+                                        get_identifier("_Dmodule_ref"),
+                                        build_pointer_type(mod_ref_type));
     d_keep(the_mod_ref);
     DECL_EXTERNAL(the_mod_ref) = 1;
     TREE_PUBLIC(the_mod_ref) = 1;
 
     tree m1 = build2(MODIFY_EXPR, void_type_node,
-        gen.component(our_mod_ref, f0),
-        the_mod_ref);
+                     gen.component(our_mod_ref, f0),
+                     the_mod_ref);
     tree m2 = build2(MODIFY_EXPR, void_type_node,
-        the_mod_ref, gen.addressOf(our_mod_ref));
+                     the_mod_ref, gen.addressOf(our_mod_ref));
     tree exp = build2(COMPOUND_EXPR, void_type_node, m1, m2);
 
     g.ofile->doSimpleFunction("*__modinit", exp, true);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.