summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pointer-arith-9.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-29 06:11:17 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-29 06:11:17 +0000
commit499e523fe9ecda106a5d7fa62f9f69a2c38655e1 (patch)
tree5976c29f228db9cd8c5b348833f6a8f115e967e0 /gcc/testsuite/gcc.dg/pointer-arith-9.c
parent316c15b8e1f760b7888ebf3afe380bbe5c3859f3 (diff)
downloadgcc-499e523fe9ecda106a5d7fa62f9f69a2c38655e1.tar.gz
* c-common.c (pointer_int_sum): Do the negation in sizetype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pointer-arith-9.c')
-rw-r--r--gcc/testsuite/gcc.dg/pointer-arith-9.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pointer-arith-9.c b/gcc/testsuite/gcc.dg/pointer-arith-9.c
new file mode 100644
index 00000000000..2d261127200
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pointer-arith-9.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void *foo(void)
+{
+ return (void *)0 - 1;
+}