This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ubsan and C++14 constexpr ICEs (PR sanitizer/63956)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]