Commit 2e9c8641 by Martin Sebor Committed by Martin Sebor

PR c/51147 - attribute((mode(byte))) on an enum generates wrong code

gcc/testsuite/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

        PR c/51147
        * gcc.dg/enum-mode-2.c: New test.

From-SVN: r233686
parent 44293580
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
......
/* 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" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment