re PR middle-end/16693 (Bitwise AND is lost when used within a cast to an enum of...
authorRoger Sayle <roger@eyesopen.com>
Wed, 25 Aug 2004 20:51:02 +0000 (20:51 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Wed, 25 Aug 2004 20:51:02 +0000 (20:51 +0000)
commitd0c5c9b14da834ec8345a4aca53d45334cb5562a
tree9d83bd3b2e6a19b9638628f3287e9f2071b81783
parent700686faf4b0dd347b1dc735569b9fdfaef925d6
re PR middle-end/16693 (Bitwise AND is lost when used within a cast to an enum of the same precision)

PR middle-end/16693
PR tree-optimization/16372
* decl.c (finish_enum): Make the precision of the enumerated type
the same width as the underlying integer type.

* g++.dg/opt/pr16372-1.C: New test case.
* g++.dg/opt/pr16693-1.C: New test case.
* g++.dg/opt/pr16693-2.C: New test case.

From-SVN: r86576
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr16372-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/pr16693-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/pr16693-2.C [new file with mode: 0644]