* c-common.c (handle_mode_attribute): For ENUMERAL_TYPE, also copy
TYPE_MODE.
* gcc.c-torture/execute/
20050107-1.c: New test.
From-SVN: r93066
+2005-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ * c-common.c (handle_mode_attribute): For ENUMERAL_TYPE, also copy
+ TYPE_MODE.
+
2005-01-07 David Edelsohn <edelsohn@gnu.org>
PR target/13674
TYPE_MAX_VALUE (type) = TYPE_MAX_VALUE (typefm);
TYPE_SIZE (type) = TYPE_SIZE (typefm);
TYPE_SIZE_UNIT (type) = TYPE_SIZE_UNIT (typefm);
+ TYPE_MODE (type) = TYPE_MODE (typefm);
if (!TYPE_USER_ALIGN (type))
TYPE_ALIGN (type) = TYPE_ALIGN (typefm);
+2005-01-07 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/execute/20050107-1.c: New test.
+
2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19298
--- /dev/null
+typedef enum { C = 1, D = 2 } B;
+extern void abort (void);
+
+struct S
+{
+ B __attribute__ ((mode (byte))) a;
+ B __attribute__ ((mode (byte))) b;
+};
+
+void
+foo (struct S *x)
+{
+ if (x->a != C || x->b != D)
+ abort ();
+}
+
+int
+main (void)
+{
+ struct S s;
+ s.a = C;
+ s.b = D;
+ foo (&s);
+ return 0;
+}