From 5922c21599d7fdbeb5f63701b5b364df1c086538 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 1 Aug 2005 02:29:06 +0100 Subject: re PR c/22311 (internal compiler error: in c_common_type (-fshort-enums)) PR c/22311 * c-typeck.c (build_binary_op): Use common_type wrapper on shortened types. (common_type): Update comment. testsuite: * gcc.dg/pr22311-1.c : New test. From-SVN: r102615 --- gcc/testsuite/gcc.dg/pr22311-1.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr22311-1.c (limited to 'gcc/testsuite/gcc.dg/pr22311-1.c') diff --git a/gcc/testsuite/gcc.dg/pr22311-1.c b/gcc/testsuite/gcc.dg/pr22311-1.c new file mode 100644 index 0000000..4eec5ce --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr22311-1.c @@ -0,0 +1,6 @@ +/* Bug 22311: ICE with -fshort-enums on shortened operations. */ +/* { dg-do compile } */ +/* { dg-options "-fshort-enums" } */ + +typedef enum { A = 1 } E; +void f(E e, unsigned char c) { c |= e; } -- cgit v1.1