On 11/20/2014 02:04 PM, Marek Polacek wrote:
+  if (fun == NULL_TREE)
+    switch (CALL_EXPR_IFN (t))
+      {
+      case IFN_UBSAN_NULL:
+      case IFN_UBSAN_BOUNDS:
+       return void_node;
+      default:
+       break;
+      }

Other IFNs should make the call non-constant.

-/* { dg-error "is not a constant expression" "" { target c++ } 12 } */
+/* { dg-warning "right shift count is negative" "" { target c++ } 12 } */

This should be an xfail (pending the delayed folding work) instead of a different test.

+constexpr int n3 = fn7 ((const int *) 0, 8); // { dg-error "is not a constant 
expression|constexpr call flows off" }

The "flows off the end" error is a bug and should not be tested for. I'm going to check in a fix.

Jason

Reply via email to