gcc/testsuite/ChangeLog:
2016-02-24 Martin Sebor <msebor@redhat.com>
PR c/51147
* gcc.dg/enum-mode-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233686
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-02-24 Martin Sebor <msebor@redhat.com>
+
+ PR c/51147
+ * gcc.dg/enum-mode-2.c: New test.
+
2016-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/69922
--- /dev/null
+/* PR c/51147 - attribute((mode(byte))) on an enum generates wrong code */
+
+/* { dg-do compile } */
+/* { dg-additional-options "-O2 -fdump-tree-optimized" } */
+
+enum _eq_bool
+{
+ false,
+ true
+} __attribute__((mode (byte)));
+
+typedef enum _eq_bool bool;
+
+bool foo (void);
+bool bar (void);
+
+bool test (void)
+{
+ return foo () || bar ();
+}
+
+/* { dg-final { scan-tree-dump-times "foo|bar" 2 "optimized" } } */