aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2017-08-04 11:28:04 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2017-08-04 11:28:04 +0000
commitf4f2c2ece3c309ac3d7e8a6bfd9f6cd9c6cb95a1 (patch)
tree036d0f437c35140e96e4226f26fbaf9c690128ba /gcc/testsuite/gcc.dg
parent62c8a2cf17cd794241c8f978c8fcfc4682ca4315 (diff)
downloadgcc-f4f2c2ece3c309ac3d7e8a6bfd9f6cd9c6cb95a1.zip
gcc-f4f2c2ece3c309ac3d7e8a6bfd9f6cd9c6cb95a1.tar.gz
gcc-f4f2c2ece3c309ac3d7e8a6bfd9f6cd9c6cb95a1.tar.bz2
re PR middle-end/81695 (internal compiler error: in size_binop_loc, at fold-const.c:1768)
PR middle-end/81695 * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1], perform the computation in offset_int. * gcc.dg/pr81695.c: New test. From-SVN: r250871
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/pr81695.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr81695.c b/gcc/testsuite/gcc.dg/pr81695.c
new file mode 100644
index 0000000..c345258
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr81695.c
@@ -0,0 +1,11 @@
+/* PR middle-end/81695 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int z[] = { };
+
+int
+main (void)
+{
+ __builtin_printf ("%d\n", *(z + 1));
+}