diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-16 12:21:31 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-16 12:21:31 -0800 |
commit | b43d6db9780462273c4d885a0111e3376c114c61 (patch) | |
tree | 0dff7e34fe65a75ba82e4a13d69991fdaea7c5eb /gcc/c-family | |
parent | 9419b14e109a2807361a9f695f5767f03dfa0cae (diff) | |
parent | 24ca97325cab7bc454c785d55f37120fe7ea6f74 (diff) | |
download | gcc-b43d6db9780462273c4d885a0111e3376c114c61.zip gcc-b43d6db9780462273c4d885a0111e3376c114c61.tar.gz gcc-b43d6db9780462273c4d885a0111e3376c114c61.tar.bz2 |
Merge from trunk revision 24ca97325cab7bc454c785d55f37120fe7ea6f74.
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.cc | 6 | ||||
-rw-r--r-- | gcc/c-family/c-omp.cc | 9 | ||||
-rw-r--r-- | gcc/c-family/c-pretty-print.cc | 6 |
4 files changed, 23 insertions, 4 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 78f6f6f..340e2c0 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2022-02-14 Richard Biener <rguenther@suse.de> + + PR c/104505 + * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle + internal function calls. + 2022-02-11 Richard Biener <rguenther@suse.de> * c-attribs.cc (c_common_attribute_table): Add entry for diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index bf0749b..7203d76 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -3174,7 +3174,11 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr, else if (real1 && real2 && (DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop0))) || DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (primop1))))) - return NULL_TREE; + { + type = *restype_ptr; + primop0 = op0; + primop1 = op1; + } else if (real1 && real2 && (TYPE_PRECISION (TREE_TYPE (primop0)) diff --git a/gcc/c-family/c-omp.cc b/gcc/c-family/c-omp.cc index f5314d6..cd9d866 100644 --- a/gcc/c-family/c-omp.cc +++ b/gcc/c-family/c-omp.cc @@ -353,8 +353,13 @@ c_finish_omp_atomic (location_t loc, enum tree_code code, } bool save = in_late_binary_op; in_late_binary_op = true; - x = build_modify_expr (loc, blhs ? blhs : lhs, NULL_TREE, opcode, - loc, rhs, NULL_TREE); + if ((opcode == MIN_EXPR || opcode == MAX_EXPR) + && build_binary_op (loc, LT_EXPR, blhs ? blhs : lhs, rhs, + true) == error_mark_node) + x = error_mark_node; + else + x = build_modify_expr (loc, blhs ? blhs : lhs, NULL_TREE, opcode, + loc, rhs, NULL_TREE); in_late_binary_op = save; if (x == error_mark_node) return error_mark_node; diff --git a/gcc/c-family/c-pretty-print.cc b/gcc/c-family/c-pretty-print.cc index ceedaea..dac1775 100644 --- a/gcc/c-family/c-pretty-print.cc +++ b/gcc/c-family/c-pretty-print.cc @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "selftest.h" #include "langhooks.h" #include "options.h" +#include "internal-fn.h" /* The pretty-printer code is primarily designed to closely follow (GNU) C and C++ grammars. That is to be contrasted with spaghetti @@ -1601,7 +1602,10 @@ c_pretty_printer::postfix_expression (tree e) { call_expr_arg_iterator iter; tree arg; - postfix_expression (CALL_EXPR_FN (e)); + if (CALL_EXPR_FN (e) != NULL_TREE) + postfix_expression (CALL_EXPR_FN (e)); + else + pp_string (this, internal_fn_name (CALL_EXPR_IFN (e))); pp_c_left_paren (this); FOR_EACH_CALL_EXPR_ARG (arg, iter, e) { |