2014-10-30 Richard Biener <rguenther@suse.de>
* match.pd: Implement more patterns that simplify to a single value.
* fold-const.c (fold_binary_loc): Remove them here.
* tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise.
(fwprop_ssa_val): Remove restriction on single uses.
From-SVN: r216933
2014-10-30 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
2014-10-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
indication is provided, check properly that it covers the element
type of of the container type.
2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
* g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
-based hash table.
From-SVN: r216926
2014-10-30 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
Has_Following_Address_Clause so that it returns the address
clause if present, rather than a boolean value.
* sem_ch3.adb (Analyze_Object_Declaration): use
Following_Address_Clause.
* exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
is initialized, insert tag assignment after object is frozen,
which may be after an address clause that follows the declaration.
2014-10-30 Tristan Gingold <gingold@adacore.com>
* system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
system-vxworks-arm.ads, system-freebsd-x86_64.ads,
system-linux-hppa.ads, system-linux-s390.ads,
system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
system-solaris-x86_64.ads, system-mingw-x86_64.ads,
system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
pragma No_Elaboration_Code_All.
2014-10-30 Eric Botcazou <ebotcazou@adacore.com>
* gnat_ugn.texi: Minor improvement to -flto entry.
From-SVN: r216921
2014-10-30 Yannick Moy <moy@adacore.com>
* inline.adb (Has_Single_Return_In_GNATprove_Mode):
Return False when return statement is inside one or more blocks.
2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
object declaration initialized by a function call that returns
an unconstrained result may be rewritted as a renaming of the
secondary stack result.
2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry for aspect Extensions_Visible in
table Canonical_Aspect.
* aspects.ads: Add entry for aspect Extensions_Visible in
tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
Implementation_Defined_Aspect.
* einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
the list of contract pragmas.
* par-prag.adb Pragma Extensions_Visible does not require special
processing from the parser.
* sem_ch3.adb (Analyze_Object_Declaration): Prevent an
implicit class-wide conversion of a formal parameter
of a specific tagged type whose related subprogram is
subject to pragma Extensions_Visible with value "False".
(Check_Abstract_Overriding): Add various overriding checks
related to pragma Extensions_Visible.
(Derive_Subprogram):
A subprogram subject to pragma Extensions_Visible with value
False requires overriding if the subprogram has at least one
controlling OUT parameter.
(Is_EVF_Procedure): New routine.
* sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
a specific tagged type whose related subprogram is subject to
pragma Extensions_Visible with value "False" cannot appear in
a class-wide conversion.
* sem_ch6.adb (Analyze_Subprogram_Contract): Remove
the assertion to account for pragma Extensions_Visible.
(Check_Overriding_Indicator): An overriding subprogram
inherits the contact of the overridden subprogram.
(New_Overloaded_Entity): An overriding subprogram inherits the
contact of the overridden subprogram.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
for aspect Extensions_Visible.
(Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
require special processing at the freeze point.
* sem_prag.adb Add an entry for pragma Extensions_Visible in
table Sig_Flags.
(Analyze_Pragma): Ensure that various SPARK
pragmas lack identifiers in their arguments. Add processing for
pragma Extensions_Visible.
(Chain_CTC): Code reformatting.
* sem_res.adb (Resolve_Actuals): A formal parameter of a
specific tagged type whose related subprogram is subject to
pragma Extensions_Visible with value "False" cannot act as an
actual in a subprogram with value "True".
* sem_util.adb (Add_Classification): New routine.
(Add_Contract_Item): Account for pragma Extensions_Visible. Code
reformatting.
(Add_Contract_Test_Case): New routine.
(Add_Pre_Post_Condition): New routine.
(Extensions_Visible_Status): New routine.
(Inherit_Subprogram_Contract): New routine.
(Is_EVF_Expression): New routine.
(Is_Specific_Tagged_Type): New routine.
* sem_util.ads Add type Extensions_Visible_Mode and document all values.
(Add_Contract_Item): Add pragma Extensions_Visible to the
comment on usage.
(Inherit_Subprogram_Contract): New routine.
(Is_EVF_Expression): New routine.
(Is_Specific_Tagged_Type): New routine.
* sinfo.adb (Is_Inherited): New routine.
(Set_Is_Inherited): New routine.
* sinfo.ads Add flag Is_Inherited along with its usage in
nodes.
(Is_Inherited): New routine along with pragma Inline.
(Set_Is_Inherited): New routine along with pragma Inline.
* snames.ads-tmpl: Add predefined name "Extensions_Visible"
and a new Pragma_Id for the pragma.
From-SVN: r216919
* config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
recog state after aarch64_prev_real_insn call.
* gcc.target/aarch64/madd_after_asm_1.c: New test.
From-SVN: r216852
PR ipa/63587
* g++.dg/ipa/pr63587-1.C: New test
* g++.dg/ipa/pr63587-2.C: New test.
* cgraphunit.c (cgraph_node::expand_thunk): Only VAR_DECLs are put
to local declarations.
* function.c (add_local_decl): Implementation moved from header
file, assert introduced for tree type.
* function.h: Likewise.
From-SVN: r216841
gcc/:
* godump.c (go_format_type): Represent "float _Complex" and
"double _Complex" as complex64 or complex128 in Go, as appropriate.
gcc/testsuite/:
* gcc.misc-tests/godump-1.c: Add tests for complex types.
From-SVN: r216840
2014-10-29 Richard Biener <rguenther@suse.de>
* match.pd: Implement a first set of conversion patterns.
* fold-const.c (fold_unary_loc): Remove them here.
* tree-ssa-forwprop.c (simplify_vce): Remove.
(pass_forwprop::execute): Do not call simplify_vce.
From-SVN: r216839
Continuing the cleanups of libgcc soft-fp configuration for
powerpc*-*-linux* in preparation for implementing
TARGET_ATOMIC_ASSIGN_EXPAND_FENV for soft-float and e500, this patch
optimizes the choice of which functions to build for the e500 cases.
For e500v2, use of hardfp is generally right, except that calls to
__unordsf2 and __unorddf2 are actually generated by GCC from
__builtin_isunordered and so they need to be implemented with soft-fp
to avoid recursively calling themselves. For e500v1, hardfp is right
for SFmode (except for __unordsf2) but soft-fp for DFmode (and when
using soft-fp, as usual it's best for the conversions between DFmode
and integers all to come directly from soft-fp rather than some coming
from libgcc2.c). Thus, new variables hardfp_exclusions and
softfp_extras are added that configurations using t-hardfp and
t-softfp can use to achieve the desired effect of selectively mixing
the two sources of functions.
Tested with no regressions for crosses to powerpc-linux-gnuspe (both
e500v1 and e500v2); also checked that the same set of symbols and
versions is exported from shared libgcc before and after the patch.
* config/t-hardfp (hardfp_exclusions): Document new variable for
user to define.
(hardfp_func_list): Exclude functions from $(hardfp_exclusions).
* config/t-softfp (softfp_extras): Document new variable for user
to define.
(softfp_func_list): Add functions from $(softfp_extras).
* config/rs6000/t-e500v1-fp, config/rs6000/t-e500v2-fp: New files.
* config.host (powerpc*-*-linux*): For e500v1, use
rs6000/t-e500v1-fp and t-hardfp; do not use t-softfp-sfdf and
t-softfp-excl. For e500v2, use t-hardfp-sfdf, rs6000/t-e500v2-fp
and t-hardfp; do not use t-softfp-sfdf and t-softfp-excl.
From-SVN: r216835
* Makefile.am (CXXFLAGS, LDFLAGS): Filter out -fsanitize=address.
(libiberty_normal, libiberty_noasan, libiberty_pic, libiberty_dep):
New variables.
(libiberty): Set to -Wc, followed by the first existing noasan/,
pic/ or . libiberty.a.
(libcc1plugin_la_DEPENDENCIES, libcc1plugin_la_LINK,
libcc1_la_DEPENDENCIES, libcc1_la_LINK, LTLDFLAGS): New variables.
* Makefile.in: Regenerated.
From-SVN: r216832
gcc/
PR rtl-optimization/63340 (part 1)
* ira-costs.c (all_cost_classes): New variable.
(complete_cost_classes): New function, split out from...
(setup_cost_classes): ...here.
(initiate_regno_cost_classes): Set up all_cost_classes.
(restrict_cost_classes): New function.
(setup_regno_cost_classes_by_aclass): Restrict the cost classes to
registers that are valid for the register's mode.
(setup_regno_cost_classes_by_mode): Model the mode cache as a
restriction of all_cost_classes to a particular mode.
(print_allocno_costs): Remove contains_reg_of_mode check.
(print_pseudo_costs, find_costs_and_classes): Likewise.
From-SVN: r216828
2014-10-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/44054
* gfortran.h (gfc_warning_cmdline): Rename as gfc_warning_now_2.
(gfc_error_cmdline): Rename as gfc_error_now_2.
* error.c (gfc_diagnostic_build_locus_prefix): Remove trailing space.
(gfc_diagnostic_starter): Add space between locus and prefix.
(gfc_warning_now_2): Renamed from gfc_warning_cmdline.
(gfc_error_now_2): Renamed from gfc_error_cmdline.
* scanner.c (add_path_to_list): Use gfc_warning_now_2.
(load_line): Likewise.
(load_file): Likewise.
* options.c (gfc_post_options): Update all renamed functions.
From-SVN: r216812
gcc/:
* godump.c (precision_to_units): New helper function.
(go_append_artificial_name): Ditto.
(go_append_decl_name): Ditto.
(go_append_bitfield): Ditto.
(go_get_uinttype_for_precision): Ditto.
(go_append_padding): Ditto.
(go_force_record_alignment): Ditto.
(go_format_type): Represent unions with an array of uints of the size
of the alignment in go. This fixes the 'random' size of the union's
representation using just the first field.
(go_format_type): Add argument that indicates whether a record is
nested (used for generation of artificial go names).
(go_output_fndecl): Adapt to new go_format_type signature.
(go_output_typedef): Ditto.
(go_output_var): Ditto.
(go_output_var): Prefer to output type as alias (typedef).
(go_format_type): Bitfields in records are simulated as arrays of bytes
in go.
* godump.c (go_format_type): Fix handling of arrays with zero elements.
gcc/testsuite/:
* gcc.misc-tests/godump.exp: New.
* gcc.misc-tests/godump-1.c: New.
From-SVN: r216806