diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr23960.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr23960.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23960.c b/gcc/testsuite/gcc.c-torture/compile/pr23960.c new file mode 100644 index 000000000..5ca0562af --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr23960.c @@ -0,0 +1,12 @@ +/* PR tree-optimization/23960 + fold-const.c used to construct a comparison node with one pointer + operand and one non-pointer operand. */ + +void abort (void) __attribute__ ((noreturn)); + +void +foo (char *d, unsigned long int n) +{ + if (d + n > d) + abort (); +} |