summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr54103-1.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-20 20:49:06 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-20 20:49:06 +0000
commit19acbc08c654cb50ab14b0d17dd405ca9b29bcc2 (patch)
tree3fa77bcd9489ba1ad8ccca53cfe0bfb8974b3e3f /gcc/testsuite/gcc.c-torture/compile/pr54103-1.c
parentd4b688972c9148002cdc5a028a48bf08139a1dd5 (diff)
downloadgcc-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.c5
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;
+}