2014-11-07 Arnaud Charlet <charlet@adacore.com>
* debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
a keyword in Ada 95 mode when -gnatd.D is used.
* gnat_ugn.texi: Document -gnatd.D.
2014-11-07 Vasiliy Fofanov <fofanov@adacore.com>
* gnatls.adb: Lower severity of the program's return value in
some common cases.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Decorate_Type): The limited view of a tagged
type has an empty list of primitive operations.
2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
RM.
(Process_Full_View): Update references to SPARK RM.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
to SPARK RM.
(Analyze_Subprogram_Body_Helper): Update references
to SPARK RM.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update references
to SPARK RM.
* sem_prag.adb (Check_Ghost_Constituent): Update references to
SPARK RM.
* sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
(Resolve_Actuals): Ensure that the actual parameter of a Ghost
subprogram whose formal is of mode IN OUT or OUT is Ghost.
* sem_util.adb (Check_Ghost_Completion): Update references to
SPARK RM.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Make_Final_Call): If type of designated object is
derived from that of the formal of the Deep_Finalize procedure,
add an unchecked conversion to prevent spurious type error.
2014-11-07 Robert Dewar <dewar@adacore.com>
* table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
Minor reformatting.
2014-11-07 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
From-SVN: r217227
2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Set_Is_Checked_Ghost_Entity,
Set_Is_Ignored_Ghost_Entity): Add exceptions to the assertion
check.
* sem_ch6.adb (Check_Conformance): Consider only
source subprograms when checking for Ghost conformance.
* sem_prag.adb (Analyze_Pragma): Handle the case
where pragma Ghost applies to a stand alone subprogram body that
acts as a compilation unit.
* sem_res.adb: Minor reformatting (merge if statements).
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
Check whether underlying type is constrained before generating
the object declaration for the result object of the function.
From-SVN: r217226
2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Entity): Issue an error regardless of the
SPARK_Mode when a ghost type is effectively volatile.
* sem_ch3.adb (Analyze_Object_Contract): Decouple the checks
related to Ghost from SPARK_Mode.
* sem_res.adb (Check_Ghost_Policy): Issue an error regardless
of the SPARK_Mode when the Ghost policies do not match.
* sem_util.adb (Check_Ghost_Completion): Issue an error regardless
of the SPARK_Mode when the Ghost policies do not match.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): return if name
in iterator does not have any usable aspect for iteration.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Null_Procedure): Reject a null procedure
that there is a previous null procedure in scope with a matching
profile.
2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
* atree.adb (Copy_Separate_Tree): Copy the aspect specifications.
* inline.adb (Has_Some_Contract): Do the check only when the
related entity has been analyzed.
From-SVN: r217224
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* exp_fixd.adb (Expand_Multiply_Fixed_By_Fixed_Giving_Integer):
If the restriction No_Floating_Point is in effect, and the
operands have the same type, introduce a temporary to hold
the fixed point result, to prevent the use of floating-point
operations at run-time.
2014-11-07 Robert Dewar <dewar@adacore.com>
* freeze.adb (Check_Address_Clause): Minor reformatting
(Find_Constant): Minor reformatting.
(Freeze_Array_Type): Modify check for packed declarations.
(Freeze_Entity): Minor reformatting.
From-SVN: r217223
PR ipa/63580
* cgraphunit.c (cgraph_node::create_wrapper):
TREE_ADDRESSABLE is set to false for a newly created thunk.
* g++.dg/ipa/pr63580.C: New test.
From-SVN: r217222
PR ipa/63595
* g++.dg/ipa/pr63595.C: New test.
* cgraphunit.c (cgraph_node::expand_thunk): DECL_BY_REFERENCE
is correctly handled for thunks created by IPA ICF.
From-SVN: r217218
2014-11-07 Richard Biener <rguenther@suse.de>
* match.pd: Add patterns for POINTER_PLUS_EXPR association
and special patterns from tree-ssa-forwprop.c
* fold-const.c (fold_binary_loc): Remove them here.
* tree-ssa-forwprop.c (to_purge): New global bitmap.
(fwprop_set_lattice_val): New function.
(fwprop_invalidate_lattice): Likewise.
(remove_prop_source_from_use): Instead of purging dead EH
edges record blocks to do that in to_purge.
(tidy_after_forward_propagate_addr): Likewise.
(forward_propagate_addr_expr): Invalidate the lattice for
SSA names we release.
(simplify_conversion_from_bitmask): Likewise.
(simplify_builtin_call): Likewise.
(associate_pointerplus_align): Remove.
(associate_pointerplus_diff): Likewise.
(associate_pointerplus): Likewise.
(fold_all_stmts): Merge with ...
(pass_forwprop::execute): ... the original loop over all
basic-blocks. Delay purging dead EH edges and invalidate
the lattice for SSA names we release.
From-SVN: r217213
2014-11-06 Steve Ellcey <sellcey@imgtec.com>
* config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments.
Set default_mips_arch and default_mips_abi instead of tm_defines.
(mips*-*-linux*): Set default_mips_arch and default_mips_abi instead
of tm_defines.
(mips*-*-*): Check with_arch and with_abi. Set tm_defines.
* config/mips/mips.h (STANDARD_STARTFILE_PREFIX_1): Set default
based on MIPS_ABI_DEFAULT.
(STANDARD_STARTFILE_PREFIX_2): Ditto.
From-SVN: r217203
This patch makes cpplib track the original spellings of extended
identifiers, as well as the canonical UTF-8 version, in order to
follow standard semantics properly without needing a convoluted and
undocumented canonicalization in translation phase 1 (see bug 9449
comments 39-46 regarding such a canonicalization).
The spelling is tracked in cpp_identifier and cpp_macro_arg without
making cpp_token any larger. The original spelling is used for checks
of duplicate macro definitions, stringizing (see the C++ tests added;
this case is only an issue for C++ not C because C makes it
implementation-defined whether a \ is inserted before the \ of a UCN
in a string or character constant when stringizing, while C++ does
not), pasting (relevant when the result is then stringized for C++)
and when macro definitions are output as text (e.g. for -d options).
Once a macro has been defined, only the original spelling of the
argument names needs keeping in the argument list. While it is being
defined, however, both spellings are needed: the original one for
subsequent saving for checks of duplicate macro definitions, and the
canonical one which is the node marked specially to generate macro
argument tokens rather than normal identifier tokens. The buffer that
is used to save the original values of the identifier tokens is
changed so that it stores both those original values and a pointer to
the canonical hash nodes, so that those canonical nodes can be found
when their values need restoring after the macro definition has been
parsed.
I believe this covers the known standards issues in extended
identifiers support (the remaining unimplemented C99 areas in GCC all
being floating-point-related), except for C++ translation of extended
characters to UCNs in phase 1 (which I have no plans to work on).
There are however probably issues left with handling of extended
identifiers in other places, as listed in
<https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00337.html> (those
issues are generally the sort of thing that could be addressed as bugs
outside development stage 1). (The bulk of the potential issues Zack
was concerned about in 2003-5, that resulted in extended identifiers
being disabled in the absence of -fextended-identifiers, were
effectively eliminated by the audit and fixes I did in 2009, however;
that todo list reflects what was left over after that audit.)
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
libcpp:
* include/cpp-id-data.h (struct cpp_macro): Update comment
regarding parameters.
* include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
Add spelling fields.
(struct cpp_token): Update comment on macro_arg.
* internal.h (_cpp_save_parameter): Add extra argument.
(_cpp_spell_ident_ucns): New declaration.
* lex.c (lex_identifier): Add SPELLING argument. Set *SPELLING to
original spelling of identifier.
(_cpp_lex_direct): Update calls to lex_identifier.
(_cpp_spell_ident_ucns): New function, factored out of
cpp_spell_token.
(cpp_spell_token): Adjust FORSTRING argument semantics to return
original spelling of identifiers. Use _cpp_spell_ident_ucns in
!FORSTRING case.
(_cpp_equiv_tokens): Check spellings of identifiers and macro
arguments are identical.
* macro.c (macro_arg_saved_data): New structure.
(paste_tokens): Use original spellings of identifiers from
cpp_spell_token.
(_cpp_save_parameter): Add argument SPELLING. Save both canonical
node and its value.
(parse_params): Update calls to _cpp_save_parameter.
(lex_expansion_token): Save spelling of macro argument tokens.
(_cpp_create_definition): Extract canonical node from saved data.
(cpp_macro_definition): Use UCNs in spelling of macro name. Use
original spellings of macro argument tokens and identifiers.
* traditional.c (scan_parameters): Update call to
_cpp_save_parameter.
gcc:
* doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner
cases of extended identifiers.
gcc/testsuite:
* g++.dg/cpp/ucnid-2.C, g++.dg/cpp/ucnid-3.C,
gcc.dg/cpp/ucnid-11.c, gcc.dg/cpp/ucnid-12.c,
gcc.dg/cpp/ucnid-13.c, gcc.dg/cpp/ucnid-14.c,
gcc.dg/cpp/ucnid-15.c: New tests.
From-SVN: r217202
* config/m32c/cond.md (movqicc_<code>_<mode>): Remove mode of
conditional.
(movhicc_<code>_<mode>): Likewise.
* config/m32c/m32c.c (encode_pattern_1): Specialise PSImode
subregs.
(m32c_eh_return_data_regno): Change to using memregs to avoid
tying up all the compute regs.
(m32c_legitimate_address_p) Subregs are not valid addresses.
From-SVN: r217200
* target.def (call_args, end_call_args): New hooks.
* hooks.c (hook_void_rtx_tree): New empty function.
* hooks.h (hook_void_rtx_tree): Declare.
* doc/tm.texi.in (TARGET_CALL_ARGS, TARGET_END_CALL_ARGS): Add.
* doc/tm.texi: Regenerate.
* calls.c (expand_call): Slightly rearrange the code. Use the two new
hooks.
(expand_library_call_value_1): Use the two new hooks.
From-SVN: r217199
gcc/testsuite/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* gcc.misc-tests/output.exp: New test case for identical input and
output files.
include/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* filenames.h: Add prototype for canonical_filename_eq.
gcc/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* diagnostic-core.h: Add prototype for fatal_error.
* diagnostic.c (fatal_error): New function fatal_error.
* gcc.c (store_arg): Remove have_o_argbuf_index.
(process_command): Check if input and output files are the same.
* toplev.c (init_asm_output): Check if input and output files are
the same.
libiberty/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* filename_cmp.c (canonical_filename_eq): New function to check if
file names are the same.
* functions.texi: Updated with documentation for new function.
From-SVN: r217159
* gcc-interface/trans.c (Subprogram_Body_to_gnu): For a function with
copy-in/copy-out parameters and which returns by invisible reference,
do not create the variable for the return value; instead, manually
generate the indirect copy out statements on exit.
(gnat_to_gnu) <N_Simple_Return_Statement>: Adjust accordingly and build
a simple indirect assignment for the return value.
From-SVN: r217155