This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Add test case for ICE after error messages
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 9 Nov 2008 20:22:03 -0500
- Subject: [lto] Add test case for ICE after error messages
This used to produce a segfault after the error message for using
free on a non-heap object. Not anymore. Adding test to prevent
future breakage.
Diego.
* gcc.dg/lto/20081109_0.c: New.
Index: gcc.dg/lto/20081109_0.c
===================================================================
--- gcc.dg/lto/20081109_0.c (revision 0)
+++ gcc.dg/lto/20081109_0.c (revision 0)
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+/* { dg-options "{-w -flto-single}" } */
+void Foo(void) { char bar[1]; free(bar); }