re PR c++/60267 (ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubs...
authorJakub Jelinek <jakub@redhat.com>
Wed, 19 Feb 2014 16:45:21 +0000 (17:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 19 Feb 2014 16:45:21 +0000 (17:45 +0100)
PR c++/60267
* c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
for PRAGMA_IVDEP if flag_preprocess_only.

* gcc.dg/pr60267.c: New test.

From-SVN: r207911

gcc/c-family/ChangeLog
gcc/c-family/c-pragma.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr60267.c [new file with mode: 0644]

index 78310d2349aed8763d7c8fa77464d07edb51047b..972be93a6f60e88d9348aa9d9fcfbdf898c63797 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/60267
+       * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
+       for PRAGMA_IVDEP if flag_preprocess_only.
+
 2014-02-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/60101
index 07d23ace9450696d90396948bd0c03eebfe21348..91fffdbd5ba295d97219925ff5f44313da429585 100644 (file)
@@ -1392,8 +1392,9 @@ init_pragma (void)
     cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
                                  PRAGMA_GCC_PCH_PREPROCESS, false, false);
 
-  cpp_register_deferred_pragma (parse_in, "GCC", "ivdep", PRAGMA_IVDEP, false,
-                               false);
+  if (!flag_preprocess_only)
+    cpp_register_deferred_pragma (parse_in, "GCC", "ivdep", PRAGMA_IVDEP, false,
+                                 false);
 #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
   c_register_pragma_with_expansion (0, "pack", handle_pragma_pack);
 #else
index 3cf924bea53760b06fa4e31de1813f5a3e29d723..52f2fa8f678ff55c2e7f2331af00e7467cccd660 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/60267
+       * gcc.dg/pr60267.c: New test.
+
 2014-02-19  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/59794
diff --git a/gcc/testsuite/gcc.dg/pr60267.c b/gcc/testsuite/gcc.dg/pr60267.c
new file mode 100644 (file)
index 0000000..b6228fc
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR c++/60267 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -save-temps" } */
+
+void
+foo (int *a, int *b, int *c)
+{
+  int i;
+#pragma GCC ivdep
+  for (i = 0; i < 64; i++)
+    a[i] = b[i] * c[i];
+}
+
+/* { dg-final { cleanup-saved-temps } } */