aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/pr89704.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug/pr89704.c')
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr89704.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/pr89704.c b/gcc/testsuite/gcc.dg/debug/pr89704.c
new file mode 100644
index 00000000000..4a8cf4fa456
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr89704.c
@@ -0,0 +1,14 @@
+/* PR debug/89704 */
+/* { dg-do compile } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+
+int
+foo (void)
+{
+ lab1:;
+ lab2:;
+ static int i = (intptr_t) &&lab1 - (intptr_t) &&lab2;
+ static int j = (intptr_t) &&lab1 - (intptr_t) &&lab2;
+ return i;
+}