aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRask Ingemann Lambertsen <rask@sygehus.dk>2007-07-25 12:54:52 +0200
committerRask Ingemann Lambertsen <rask@gcc.gnu.org>2007-07-25 10:54:52 +0000
commit024fefe28f33db98a90d12347d6db01bde53f635 (patch)
treeaa7c35bbe233ddca011c1247553f87df90f950b4 /gcc/testsuite
parent107f82d2b0cc288b6dd1781c67d2c7b92a0412fc (diff)
downloadgcc-024fefe28f33db98a90d12347d6db01bde53f635.zip
gcc-024fefe28f33db98a90d12347d6db01bde53f635.tar.gz
gcc-024fefe28f33db98a90d12347d6db01bde53f635.tar.bz2
pr30313.c (struct S): Make sure the bit-field is exactly as wide as an int.
* gcc.dg/torture/pr30313.c (struct S): Make sure the bit-field is exactly as wide as an int. From-SVN: r126906
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr30313.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8b2dda7..972dbfb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-25 Rask Ingemann Lambertsen <rask@sygehus.dk>
+
+ * gcc.dg/torture/pr30313.c (struct S): Make sure the bit-field is
+ exactly as wide as an int.
+
2007-07-25 Danny Smith <dannysmith@users.sourceforge.net>
* gcc.dg/compat/struct-layout-1_generate.c (COMPAT_PRLL):
diff --git a/gcc/testsuite/gcc.dg/torture/pr30313.c b/gcc/testsuite/gcc.dg/torture/pr30313.c
index 1df85f7..aefeb78 100644
--- a/gcc/testsuite/gcc.dg/torture/pr30313.c
+++ b/gcc/testsuite/gcc.dg/torture/pr30313.c
@@ -4,7 +4,15 @@ static inline void bar(){}
struct S
{
+#if __INT_MAX__ == 32767
+ signed int i: 16;
+#elif __INT_MAX__ == 2147483647
signed int i: 32;
+#elif __INT_MAX__ == 9223372036854775807
+ signed int i: 64;
+#else
+#error Please add support for your target here
+#endif
};
int main()