aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-02-18 15:54:54 -0500
committerMarek Polacek <polacek@redhat.com>2020-02-18 16:11:53 -0500
commitb02719918d7bfa224b7caa38fdb9be095cd3f4ad (patch)
tree3122aa1af11d1723ad440226deab4569b8a35a42
parent14832dcb6997f71d35305a08724ce164930ffca0 (diff)
downloadgcc-b02719918d7bfa224b7caa38fdb9be095cd3f4ad.zip
gcc-b02719918d7bfa224b7caa38fdb9be095cd3f4ad.tar.gz
gcc-b02719918d7bfa224b7caa38fdb9be095cd3f4ad.tar.bz2
c++: Fix array-init1.C for ILP32 [PR93817]
I only tested LP64 targets and missed this maybe-long unsigned int. Tested with GXX_TESTSUITE_STDS=98,11,14,17,2a make check-c++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=array-init1.C' 2020-02-18 Marek Polacek <polacek@redhat.com> PR c++/93817 * g++.dg/diagnostic/array-init1.C: Fix for ILP32.
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/array-init1.C2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a6c09ac..600ac38 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-18 Marek Polacek <polacek@redhat.com>
+
+ PR c++/93817
+ * g++.dg/diagnostic/array-init1.C: Fix for ILP32.
+
2020-02-18 Jon Beniston <jon@beniston.com>
* gcc.dg/strcmpopt_6.c: Add space in array for terminator.
diff --git a/gcc/testsuite/g++.dg/diagnostic/array-init1.C b/gcc/testsuite/g++.dg/diagnostic/array-init1.C
index 78580ad..11b91ec 100644
--- a/gcc/testsuite/g++.dg/diagnostic/array-init1.C
+++ b/gcc/testsuite/g++.dg/diagnostic/array-init1.C
@@ -7,5 +7,5 @@ int x;
A a1[] = {
0L, // { dg-error "3:conversion from .long int. to .A. is ambiguous" }
&x, // { dg-error "3:invalid conversion from .int\\*. to .int." }
- __builtin_offsetof (A, i) // { dg-error "23:conversion from .long unsigned int. to .A. is ambiguous" }
+ __builtin_offsetof (A, i) // { dg-error "23:conversion from .\(long \)?unsigned int. to .A. is ambiguous" }
};