diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-20 20:49:06 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-20 20:49:06 +0000 |
commit | 19acbc08c654cb50ab14b0d17dd405ca9b29bcc2 (patch) | |
tree | 3fa77bcd9489ba1ad8ccca53cfe0bfb8974b3e3f /gcc/testsuite/gcc.c-torture/compile/pr54103-1.c | |
parent | d4b688972c9148002cdc5a028a48bf08139a1dd5 (diff) | |
download | gcc-19acbc08c654cb50ab14b0d17dd405ca9b29bcc2.tar.gz |
PR c/54103
* c-typeck.c (build_unary_op): Pass original argument of
TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
any C_MAYBE_CONST_EXPR, if it has integer operands.
(build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
to c_objc_common_truthvalue_conversion, then remove any
C_MAYBE_CONST_EXPR, if they have integer operands. Use
c_objc_common_truthvalue_conversion not
c_common_truthvalue_conversion.
(c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
call note_integer_operands for arguments with integer operands
that are not integer constants.
testsuite:
* gcc.c-torture/compile/pr54103-1.c,
gcc.c-torture/compile/pr54103-2.c,
gcc.c-torture/compile/pr54103-3.c,
gcc.c-torture/compile/pr54103-4.c,
gcc.c-torture/compile/pr54103-5.c,
gcc.c-torture/compile/pr54103-6.c: New tests.
* gcc.dg/c90-const-expr-8.c: Update expected column number.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr54103-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr54103-1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54103-1.c b/gcc/testsuite/gcc.c-torture/compile/pr54103-1.c new file mode 100644 index 00000000000..d941f3e1fdf --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr54103-1.c @@ -0,0 +1,5 @@ +void +f (void) +{ + 0 || 0 / 0 ? : 0; +} |