gcc/
* function.c (assign_parm_find_data_types): Set passed_mode and
nominal_mode to the TYPE_MODE of nominal_type for the built
pointer type in case of the struct-pass-by-reference.
From-SVN: r202014
* config/avr/avr.opt (mfract-convert-truncate): New option.
* config/avr/avr.c (avr_out_fract): Unless TARGET_FRACT_CONV_TRUNC
is set, round negative fractional integers according to n1169
when converting to integer types.
From-SVN: r202008
2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
Joseph Myers <joseph@codesourcery.com>
c/35649
* c-typeck.c (c_common_type): Prefer double_type_node over
other REAL_TYPE types with the same precision.
(convert_arguments): Likewise.
Amend patch as suggested:
From: "Joseph S. Myers" <joseph@codesourcery.com>
In convert_arguments I think you should be comparing TYPE_MAIN_VARIANT
(valtype) against double_type_node and long_double_type_node, rather than
just valtype.
This is PR c/35649 (so include that number in your ChangeLog entry and
close that bug as fixed).
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r202006
* c-typeck.c (c_common_type): Prefer double_type_node over
other REAL_TYPE types with the same precision.
(convert_arguments): Likewise.
From-SVN: r202004
* cgraph.c (cgraph_propagate_frequency): Do not assume that virtual
methods can not be called indirectly when their address is not taken.
From-SVN: r202003
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix formatting;
fix edge count/frequency when speculation failed; fix type check
for the direct call.
From-SVN: r201999
c-family/
* c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
virtual member function.
(pp_postfix_expression): Adjust.
(pp_c_postfix_expression): Remove.
* c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
from pp_c_postfix_expression. Adjust.
(c_pretty_printer::c_pretty_printer): Do not assign to
postfix_expression.
cp/
* cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
Declare as overrider.
* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
Rename from pp_cxx_postfix_expression. Adjust.
(pp_cxx_expression): Use pp_postfix_expression.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
postfix_expression.
From-SVN: r201985
2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/58146
* array.c (gfc_ref_dimen_size): If possible, use
gfc_dep_difference to calculate array refrence
sizes. Fall back to integer code otherwise.
* dependency.c (discard_nops). Move up.
Also discarde widening integer conversions.
(gfc_dep_compare_expr): Use discard_nops.
2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/58146
* gfortran.dg/bounds_check_18.f90: New test.
From-SVN: r201981
c-family/
* c-pretty-print.h (c_pretty_printer::primary_expression): Now a
virtua member function.
(pp_primary_expression): Adjust.
(pp_c_primary_expression): Remove.
* c-pretty-print.c (c_pretty_printer::primary_expression): Rename
from pp_c_primary_expression. Adjust.
(pp_c_initializer_list): Use pp_primary_expression.
(c_pretty_printer::c_pretty_printer): Do not assign to
primary_expression.
cp/
* cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
an overrider of c_pretty_printer::primary_expression.
* cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
Rename from pp_cxx_primary_expression. Adjust.
(pp_cxx_postfix_expression): Use pp_primary_expression.
(pp_cxx_ctor_initializer): Likewise.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
primary_expression.
From-SVN: r201978
* tree.h (TYPE_FINAL_P, DECL_FINAL_P): New macros.
(tree_decl_with_vis): Add FINAL field.
* cp-tree.h (struct lang_type_class): Free is_final bit.
(CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
(DECL_FINAL_P): Remove.
* pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
is called on CLASS_TYPE_P.
From-SVN: r201975
c-family/
* c-pretty-print.h (c_pretty_printer::id_expression): Now a
virtual function.
(pp_c_id_expression): Remove.
(pp_id_expression): Adjust.
* c-pretty-print.c (c_pretty_printer::id_expression): Rename from
pp_c_id_expression. Adjust.
(pp_c_postfix_expression): Use pp_id_expression.
(c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
cp/
* cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
* cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
from pp_cxx_id_expression. Adjust.
(pp_cxx_userdef_literal): Use pp_id_expression.
(pp_cxx_primary_expression): Likewise.
(pp_cxx_direct_declarator): Likewise.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
id_expression.
From-SVN: r201973
* c-pretty-print.h (c_pretty_printer::constant): Now a virtual
member function.
(pp_constant): Adjust.
(pp_c_constant): Remove.
* c-pretty-print.c (c_pretty_printer::constant): Rename from
pp_c_constant. Adjust.
(pp_c_constant)
(pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
(c_pretty_printer::c_pretty_printer): Remove assignment to constant.
cp/
* cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
function, overriding c_pretty_printer::constant.
* cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
pp_cxx_constant. Adjust.
(cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
From-SVN: r201969
The panic in test/fixedbugs/bug461.go was caused by the fact that
reflect expects unexported fields in a struct to have a valid
package path. If a struct field is an embedded built-in type, it is
now given the package name of the currently compiling package, so it
remains unexported for purposes of reflect.
Fixed Issue 25.
From-SVN: r201951
* ipa-utils.h (method_class_type): Declare.
* ipa-devirt.c (method_class_type): Export.
* cgraphunit.c (analyze_functions): Do basic devirtualization;
do not walk base classes of anonymous types.
From-SVN: r201944
* g++.dg/ipa/devirt-13.C: New testcase.
* g++.dg/ipa/devirt-14.C: New testcase.
* cgraphunit.c (analyze_functions): Do basic devirtualization;
do not walk base classes of anonymous types.
From-SVN: r201942
PR tree-optimization/58209
* tree-tailcall.c (process_assignment): Handle POINTER_PLUS_EXPR.
(find_tail_calls): Give up for pointer result types if m is non-NULL.
(adjust_return_value_with_ops): For PLUS_EXPR and pointer result type
emit POINTER_PLUS_EXPR.
(create_tailcall_accumulator): For pointer result type accumulate in
sizetype type.
* gcc.c-torture/execute/pr58209.c: New test.
From-SVN: r201935