OSDN Git Service

* g++.dg/other/vrp1.C: New test.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 May 2007 23:00:54 +0000 (23:00 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 May 2007 23:00:54 +0000 (23:00 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125007 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/vrp1.C [new file with mode: 0644]

index 03f6112..8abebbe 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-23  Ian Lance Taylor  <iant@google.com>
+
+       * g++.dg/other/vrp1.C: New test.
+
 2007-05-23  Simon Martin  <simartin@users.sourceforge.net>
 
        PR preprocessor/20077
diff --git a/gcc/testsuite/g++.dg/other/vrp1.C b/gcc/testsuite/g++.dg/other/vrp1.C
new file mode 100644 (file)
index 0000000..0a798c9
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+// This caused a crash in VRP because TREE_OVERFLOW was set for MIN.
+
+template<long long MIN>
+long long mod (long long l, long long r)
+{
+  if (l == MIN && r == -1)
+    return 0LL;
+  return l % r;
+}
+template long long mod<-0x8000000000000000LL> (long long, long long);