[lto] Add test case for previous failure

Diego Novillo dnovillo@google.com
Mon Jan 12 17:28:00 GMT 2009


This test used to fail when compiled with LTO enabled with:

20090112_0.C: In function 'const char* func(int)':
20090112_0.C:10: internal compiler error: vector
VEC(constructor_elt,base) push domain error, in build_constructors at tree-switch-conversion.c:450

Fixed by the latest merge from trunk.


Diego.



	* g++.dg/lto/20090112_0.C: New.

Index: g++.dg/lto/20090112_0.C
===================================================================
--- g++.dg/lto/20090112_0.C	(revision 0)
+++ g++.dg/lto/20090112_0.C	(revision 0)
@@ -0,0 +1,11 @@
+// { dg-do run }
+const char *func(int val) {
+ switch (val) {
+   case 2147483647: return "foo";
+   default: return "";
+ }
+}
+
+int main() {
+ return 0;
+}



More information about the Gcc-patches mailing list