aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-01-07 01:33:54 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-01-07 01:33:54 +0000
commit63e5f5679cf5daf7c27ca1c9a585cef733f857ce (patch)
treebd8a925d8ba1a1525c5ec0f2f4495c72b4db643f /gcc/testsuite
parent52fd80fb25a7c0791880543bd9a26c24ae454edf (diff)
downloadgcc-63e5f5679cf5daf7c27ca1c9a585cef733f857ce.zip
gcc-63e5f5679cf5daf7c27ca1c9a585cef733f857ce.tar.gz
gcc-63e5f5679cf5daf7c27ca1c9a585cef733f857ce.tar.bz2
class.c (layout_class_type): Correct handling of unnamed bitfields wider than their types.
* class.c (layout_class_type): Correct handling of unnamed bitfields wider than their types. * testsuite/g++.dg/abi/bitfield9.C: New test. From-SVN: r60966
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog2
-rw-r--r--gcc/testsuite/g++.dg/abi/bitfield9.C11
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2c8bb11..8b4fce3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,7 @@
2003-01-06 Mark Mitchell <mark@codesourcery.com>
+ * testsuite/g++.dg/abi/bitfield9.C: New test.
+
PR c++/9189
* g++.dg/parse/defarg3.C: New test.
diff --git a/gcc/testsuite/g++.dg/abi/bitfield9.C b/gcc/testsuite/g++.dg/abi/bitfield9.C
new file mode 100644
index 0000000..0d744c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/bitfield9.C
@@ -0,0 +1,11 @@
+// { dg-do run { target i?86-*-* } }
+// { dg-options -w }
+
+struct X {
+ char : 45;
+};
+
+int main () {
+ if (__alignof__ (X) != 4)
+ return 1;
+}