diff options
author | Ian Lance Taylor <iant@google.com> | 2007-05-23 23:00:54 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-05-23 23:00:54 +0000 |
commit | b9a97851b5cbf9d615dbced763ff1cd81cb5482a (patch) | |
tree | 4230d8342609bef444915a3786659b7029c3156b /gcc | |
parent | 126e073b22db98cbff92b36aaa299f62de46417d (diff) | |
download | gcc-b9a97851b5cbf9d615dbced763ff1cd81cb5482a.zip gcc-b9a97851b5cbf9d615dbced763ff1cd81cb5482a.tar.gz gcc-b9a97851b5cbf9d615dbced763ff1cd81cb5482a.tar.bz2 |
* g++.dg/other/vrp1.C: New test.
From-SVN: r125007
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/vrp1.C | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 03f6112..8abebbe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 0000000..0a798c9 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/vrp1.C @@ -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); |