]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/57541 ([Cilkplus]: internal compiler error: in gimplify_expr, at...
authorBalaji V. Iyer <balaji.v.iyer@intel.com>
Fri, 7 Jun 2013 22:16:24 +0000 (22:16 +0000)
committerBalaji V. Iyer <bviyer@gcc.gnu.org>
Fri, 7 Jun 2013 22:16:24 +0000 (15:16 -0700)
Fixed PR 57541.
gcc/c/ChangeLog
2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
        * c-array-notation.c (expand_array_notation_exprs): Added
        ARRAY_NOTATION_REF case.

gcc/testsuite/ChangeLog
2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        PR middle-end/57541
        * c-c++-common/cilk-plus/AN/pr57541.c: New test case.

From-SVN: r199837

gcc/c/ChangeLog
gcc/c/c-array-notation.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c [new file with mode: 0755]

index 7f5b5a9f0ffff332a908a2cbfe6b84bb142856ce..5fbb31f8aca1dfc768ad4a965aac09123fbe016e 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       * c-array-notation.c (expand_array_notation_exprs): Added
+       ARRAY_NOTATION_REF case.
+       
 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
 
        * c-array-notation.c (length_mismatch_in_expr_p): Moved this
index 7b13687342a03a4a3360ec8d7eed7f90ea9032d6..b1040da0cc771c4f40052503e9ac1ac450ceb004 100644 (file)
@@ -2317,6 +2317,14 @@ expand_array_notation_exprs (tree t)
     case RETURN_EXPR:
       if (contains_array_notation_expr (t))
        t = fix_return_expr (t);
+      return t;
+    case ARRAY_NOTATION_REF:
+      /* IF we are here, then we are dealing with cases like this:
+        A[:];
+        A[x:y:z];
+        A[x:y];
+        Replace those with just void zero node.  */
+      t = void_zero_node;
     default:
       return t;
     }
index dce1515118a068f29c6ff6d33474d296f42a7d73..55a3ce6d1acb109a9ba9ff53a8bb3a0dd8268b9d 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       PR middle-end/57541
+       * c-c++-common/cilk-plus/AN/pr57541.c: New test case.
+
 2013-06-07  Jan Hubicka  <jh@suse.cz>
 
        * gcc.dg/tree-ssa/attr-alias.c: Remove brackets in template.
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
new file mode 100755 (executable)
index 0000000..cabdb23
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int A[10];
+
+int main () {
+  char c = (char)N; /* { dg-error "undeclared" } */
+  short s = (short)N;
+  long l = (long)N;
+  A[l:s:c];
+}
+
+/* { dg-message "note: each" "defined" { target *-*-* }  7 } */
+
This page took 0.073487 seconds and 5 git commands to generate.