* varasm.c (default_function_rdodata_section): Make sure to pass
along a decl for a link-once section.
* g++.dg/opt/switch1.C: New test.
From-SVN: r87569
+2004-09-15 Mark Mitchell <mark@codesourcery.com>
+
+ * varasm.c (default_function_rdodata_section): Make sure to pass
+ along a decl for a link-once section.
+
2004-09-15 Richard Henderson <rth@redhat.com>
* tree-ssa-operands.c (add_call_clobber_ops): Fix unused variable
+2004-09-15 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.dg/opt/switch1.C: New test.
+
2004-09-15 Joseph S. Myers <jsm@polyomino.org.uk>
* g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C,
--- /dev/null
+// { dg-options "-O1" }
+
+template <typename T>
+int f(T t) {
+ switch (t) {
+ case 1:
+ return 5;
+ case 2:
+ return 6;
+ case 3:
+ return -4;
+ case 4:
+ return 8;
+ case 5:
+ return 12;
+ case 6:
+ return 13;
+ default:
+ return -27;
+ }
+}
+
+template int f(int);
memcpy (rname, name, len);
rname[14] = 'r';
- named_section_flags (rname, SECTION_LINKONCE);
+ named_section_real (rname, SECTION_LINKONCE, decl);
return;
}
/* For .text.foo we want to use .rodata.foo. */