From 7017d4a2d1011bf37ddc0a9fae216a96a4fa3c4c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 22 Jun 2018 19:22:43 +0200 Subject: [PATCH] re PR c++/85662 ("error: non-constant condition for static assertion" from __builtin_offsetof in C++) PR c++/85662 * g++.dg/ext/offsetof3.C: New test. From-SVN: r261909 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ext/offsetof3.C | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/offsetof3.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5147236766d..d86ac84d424 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-06-22 Jakub Jelinek + + PR c++/85662 + * g++.dg/ext/offsetof3.C: New test. + 2018-06-22 Carl Love * gcc.target/powerpc/altivec-7.c: Add qualifiers for counts on AIX diff --git a/gcc/testsuite/g++.dg/ext/offsetof3.C b/gcc/testsuite/g++.dg/ext/offsetof3.C new file mode 100644 index 00000000000..6bf4c506fe3 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/offsetof3.C @@ -0,0 +1,5 @@ +// PR c++/85662 +// { dg-do compile { target c++11 } } +// { dg-options "-O2" } + +#include "offsetof2.C" -- 2.30.2