Jakub Jelinek [Thu, 6 Dec 2012 14:37:59 +0000 (15:37 +0100)]
re PR middle-end/43631 (var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in between basic blocks)
PR middle-end/43631
* var-tracking.c (emit_note_insn_var_location, emit_notes_in_bb):
Clear BLOCK_FOR_INSN on notes emitted in between basic blocks,
don't adjust BB_END when inserting note after BB_END of some bb.
Jakub Jelinek [Thu, 6 Dec 2012 14:37:09 +0000 (15:37 +0100)]
re PR c++/55137 (Unexpected static structure initialization)
PR c++/55137
* fold-const.c (fold_binary_loc) <associate>: Don't introduce
TREE_OVERFLOW through reassociation. If type doesn't have defined
overflow, but one or both of the operands do, use the wrapping type
for reassociation and only convert to type at the end.
* g++.dg/opt/pr55137.C: New test.
* gcc.c-torture/execute/pr55137.c: New test.
Aldy Hernandez [Wed, 5 Dec 2012 21:10:18 +0000 (21:10 +0000)]
re PR target/54160 (gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later))
PR target/54160
* config/t-darwin (darwin-c.o): Depend on $(CPP_INTERNAL_H).
* config/darwin-c.c (darwin_cpp_builtins): Only set __OBJC2__
when in obj mode.
Include libcpp/internal.h.
Arnaud Charlet [Wed, 5 Dec 2012 11:21:32 +0000 (12:21 +0100)]
[multiple changes]
2012-12-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Traverse_Aspects): Ensure we always have
an entry in the sloc -> SCO map for invariants, since
Set_SCO_Pragma_Enabled is called with that sloc when checks
are enabled.
* par-prag.adb: Checks and processing of pragma Assume are
carried out by Sem_Prag.
* sem_prag.adb (Analyze_Pragma): Check the legality of pragma
Assume.
* snames.ads-tmpl: Add new name Assume. Add a pragma identifier
for Assume.
Ed Schonberg [Wed, 5 Dec 2012 11:20:13 +0000 (11:20 +0000)]
aspects.ads, [...]: Add aspect Relative_Deadline.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* aspects.ads, aspects.adb: Add aspect Relative_Deadline.
* sem_ch13.adb (Analyze_Aspect_Specifications): Process aspect
Relative_Deadline, and introduce the corresponding pragma within
the task definition of the task type to which it applies.
(Check_Aspect_At_Freeze_Point): Expression in a Relative_Deadline
aspect is of type Time_Span.
* sem_prag.adb (Check_Loop_Invariant_Variant_Placement): When pragma
Loop_[In]variant does not appear immediately within the statements
of a loop, it must appear in a chain of nested blocks.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting.
Remove redundant assertion.
Arnaud Charlet [Wed, 5 Dec 2012 11:15:35 +0000 (12:15 +0100)]
[multiple changes]
2012-12-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb, scos.ads, put_scos.adb, put_scos.ads,
get_scos.adb: Generation of SCOs for aspects.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* sem_prag.adb (Check_Precondition_Postcondition): Remove
redundant call to Set_SCO_Pragma_Enabled (the pragma will be
rewritten into a pragma Check later on, and the call will be
made when processing the rewritten pragma).
(Analyze_Pragma, case Pragma_Check): Omit call to
Set_SCO_Pragma_Enabled if Split_PPC is set.
Arnaud Charlet [Wed, 5 Dec 2012 11:11:28 +0000 (12:11 +0100)]
[multiple changes]
2012-12-05 Robert Dewar <dewar@adacore.com>
* atree.ads, par-ch4.adb, sem_attr.adb, sem_ch13.adb: Minor
reformatting.
2012-12-05 Eric Botcazou <ebotcazou@adacore.com>
* gnat_ugn.texi (Switches for gcc): Document -flto and reorder.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* par-ch5.adb (P_Condition): Handle properly Ada 2012
expressions that must be parenthesized before checking for
redundant parentheses when that check is enabled.
Arnaud Charlet [Wed, 5 Dec 2012 11:09:27 +0000 (12:09 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* par-ch4.adb (P_Allocator): In Ada 2012 (AI05-0104) an
uninitialized allocator cannot carry an explicit not null
indicator.
* sem_ch4.adb (Analyze_Allocator): Remove code that implements
the check for AI05-0104, the check is syntactic and performed
in the parser.
2012-12-05 Geert Bosch <bosch@adacore.com>
* sem_attr.adb (Analyze_Attribute): Use base type for floating
point attributes.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications,
Ahalyze_Aspect_Default_Value): For a scalar type attach default
value to base type as well, because it is a type-specific aspect
even though it can be specified on a first subtype.
Yufeng Zhang [Wed, 5 Dec 2012 11:08:43 +0000 (11:08 +0000)]
aarch64.c (aarch64_simd_mangle_map_entry): New typedef.
gcc/
2012-12-05 Yufeng Zhang <yufeng.zhang@arm.com>
* config/aarch64/aarch64.c (aarch64_simd_mangle_map_entry): New
typedef.
(aarch64_simd_mangle_map): New table.
(aarch64_mangle_type): Locate and return the mangled name for
a given AdvSIMD vector type.
Arnaud Charlet [Wed, 5 Dec 2012 11:06:35 +0000 (12:06 +0100)]
[multiple changes]
2012-12-05 Yannick Moy <moy@adacore.com>
* urealp.ads: Minor rewording.
2012-12-05 Yannick Moy <moy@adacore.com>
* aspects.ads (No_Duplicates_Allowed): Forbid use of duplicate
Contract_Cases aspects.
* sem_prag.adb (Analyze_Pragma/Pragma_Contract_Case): Rename
POST_CASE into CONTRACT_CASE in both grammar and code, to be
consistent with current language definition. Issue a more precise
error message when the pragma duplicates another pragma or aspect.
* exp_attr.adb (Expand_N_Attribute_Reference): Add processing
for attribute Update.
(Expand_Update_Attribute): New routine.
* par-ch4.adb (P_Name): The sole expression of attribute Update
is an aggregate, parse it accordingly.
* sem_attr.adb (Analyze_Attribute): Verify the legality of
attribute Update.
(Eval_Attribute): Attribute Update does not
need evaluation because it is never static.
* snames.ads-tmpl: Add Name_Update to the list of special names
recognized by the compiler. Add an Attribute_Id for Update.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Remove_Side_Effects): For purposes of removing
side effects, qualified expressions do not receive a special
treatment, even though in Ada 2012 they are defined as object
references.
Thomas Quinot [Wed, 5 Dec 2012 11:03:15 +0000 (11:03 +0000)]
exp_dist.adb (Build_From_Any_Call, [...]): For a used-defined subtype, always go to the first subtype of the base type.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb (Build_From_Any_Call, Build_To_Any_Call,
Build_TypeCode_Call): For a used-defined subtype, always go to
the first subtype of the base type.
Arnaud Charlet [Wed, 5 Dec 2012 11:02:24 +0000 (12:02 +0100)]
[multiple changes]
2012-12-05 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb: Minor reformatting.
2012-12-05 Tristan Gingold <gingold@adacore.com>
* Make-generated.in: Remove the VMS host specific part, as VMS
compilers aren't built anymore on VMS.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* sem.adb, errout.ads, atree.adb, atree.ads (Check_Error_Detected):
Only return quietly if a serious error of configurable run time
violation has been found.
2012-12-05 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): In Alfa_Mode, do not apply
conversion checks.
Arnaud Charlet [Wed, 5 Dec 2012 10:59:09 +0000 (11:59 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly
the generation of discriminant checks when the left-hand side
has a type with hidden discriminants.
* sem_ch3.ads (Is_Visible_Component): Add defaulted parameter to
specify the node on which component visibility is being checked.
* sem_ch3.adb (Is_Visible_Component): Use new parameter to
determine whether the reference comes from a type conversion to
a full view of a private type with unknown discriminants.
* sem_ch4.adb (Analyze_Selected_Component): Call
Is_Visible_Component with added parameter.
2012-12-05 Arnaud Charlet <charlet@adacore.com>
* make.adb: Minor comment update.
2012-12-05 Arnaud Charlet <charlet@adacore.com>
* gnatlink.adb: Also use -x adascil in CodePeer mode when
calling gcc.
* exp_ch5.adb: Minor reformatting.
2012-12-05 Bob Duff <duff@adacore.com>
* exp_ch4.adb: Minor comment.
2012-12-05 Bob Duff <duff@adacore.com>
* par-ch4.adb: Set Paren_Count correctly for a parenthesized expression
containing a conditional expression or quantified expression.
* sprint.adb: Update comment.
* sem_ch8.adb (Find_Selected_Component): Handle properly an
expanded name whose prefix is the expanded name of an enclosing
entry, that is to say a construct such as T.E.X, where T is an
enclosing concurrent type and E is an enclosing entry.
Arnaud Charlet [Wed, 5 Dec 2012 10:55:42 +0000 (11:55 +0100)]
[multiple changes]
2012-12-05 Robert Dewar <dewar@adacore.com>
* lib-writ.adb (Write_ALI): Output T lines.
* lib-writ.ads: Minor reformatting. Add documentation of T lines.
* opt.ads (Generate_Target_Dependent_Info): New flag.
* switch-c.adb (Scan_Switches): Recognize -gnatet switch
(target dependent info).
* ttypes.ads: Add four letter codes to declarations (for target
dependent info).
* usage.adb: Add line for -gnatet switch.
* exp_prag.adb (Expand_N_Pragma): Add a call to expand
pragma Loop_Variant.
(Expand_Pragma_Loop_Assertion): Removed.
(Expand_Pragma_Loop_Variant): New routine.
* par-prag.adb: Remove Pragma_Loop_Assertion and add two new
Pragma_Loop_Invariant and Pragma_Loop_Variant entries.
* sem_attr.adb (Analyze_Attribute): Update the code which
locates the enclosing pragma.
* sem_prag.adb (Analyze_Pragma): Remove the code which analyzes
pragma Loop_Assertion as the pragma is now obsolete. Add the
machinery to checks the semantics of pragmas Loop_Invariant
and Loop_Variant.
(Check_Loop_Invariant_Variant_Placement): New routine.
* snames.ads-tmpl: Remove name Loop_Assertion. Add new names
Loop_Invariant and Loop_Variant. Rename Name_Decreasing
to Name_Decreases and Name_Increasing to Name_Increases.
Remove the pragma Id for Loop_Assertion and add two new Ids for
Loop_Invariant and Loop_Variant.
Arnaud Charlet [Wed, 5 Dec 2012 10:47:30 +0000 (11:47 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* par-ch6.adb (P_Return_Object_Declaration): Do not check for
legality of Aliased keyword.
* sem_ch6.adb (Analyze_Function_Return): The keyword aliased is
legal in an extended return statement only if the return type
is immutably limited.
2012-12-05 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Thunk): Simplify
management of controlling formals. Required to avoid problems
with primitives of internally generated base types associated
with constrained tagged types.
Arnaud Charlet [Wed, 5 Dec 2012 10:38:36 +0000 (11:38 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_eval.adb: Remove spurious warnings.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Build_Explicit_Dereference): Set properly
the type of the prefix prior to rewriting, because subsequent
legality checks examine the original node.
* aspects.adb: Add Contract_Cases to the canonical aspects map.
* aspects.ads: Add aspect Contract_Cases in the various aspect
tables.
* par-prag.adb: The parser does not need to perform special
actions for pragma Contract_Cases.
* sem_ch6.adb (Expand_Contract_Cases): New routine.
(Process_Contract_Cases): Convert pragma Contract_Cases into pre-
and post- condition checks that verify the runtime state of all
case guards and their corresponding consequences.
* sem_ch13.adb (Analyze_Aspect_Specifications): Perform
various legality checks on aspect Contract_Cases. The aspect is
transformed into a pragma.
* sem_prag.adb: Add an entry in table Sig_Flags for pragma
Contract_Cases.
(Analyze_Pragma): Perform various legality
checks on pragma Contract_Cases. The pragma is associated with
the contract of the related subprogram.
(Chain_CTC): Omit pragma
Contract_Cases because it does not introduce a unique case name
and does not follow the syntax of Contract_Case and Test_Case.
* snames.ads-tmpl: Add new name Name_Contract_Cases. Add a
Pragma_Id for Contract_Cases.
Arnaud Charlet [Wed, 5 Dec 2012 10:35:24 +0000 (11:35 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Preanalyze_Range): If the expression, which
denotes some domain of iteration, has a type with implicit
dereference, and does not have any iterable aspects, insert
dereference to obtain proper container type.
2012-12-05 Bob Duff <duff@adacore.com>
* par-ch8.adb (P_Use_Type_Clause): Fix the Sloc for "use all type ..."
to point to "use".
2012-12-05 Arnaud Charlet <charlet@adacore.com>
* make.adb (Compile): Always pass -x adascil in CodePeer mode.
Arnaud Charlet [Wed, 5 Dec 2012 10:29:59 +0000 (11:29 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* s-rident.ads, restrict.ads: Remove discrepancies between the
documentation on implementation-defined restrictions, and
the internal data structure used for warnings and errors on
implementation-defined restriction violations.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Chain_PPC): Pre- and postcondition aspects
are legal on a subprogram body that acts as a spec.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Selected_Component): If the selector name is
an overloadable entity but the name is not overloaded, generate
reference to it rather than delaying this until resolution.
2012-12-05 Robert Dewar <dewar@adacore.com>
* checks.ads, checks.adb (Activate_Overflow_Check): No effect for
MOD/REM/unary +
* exp_ch4.adb (Expand_N_Op_Mod): Remove call to set Do_Overflow_Check.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Find_Non_Universal_Interpretation): Use the
types of the right operand if the left operand is null.
* init.c (__gnat_install_handler): For the LEON VxWorks kernel
run-time library we need to install a trap handler directly in the
trap table (no support by the OS) for the software trap 0.
Robert Dewar [Wed, 5 Dec 2012 10:15:56 +0000 (10:15 +0000)]
gnat_rm.texi: Update overflow description.
2012-12-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Update overflow description. Pragma Overflow_Checks
changed to Overflow_Mode.
2012-12-05 Robert Dewar <dewar@adacore.com>
* checks.ads, exp_ch4.adb, gnat1drv.adb, par-prag.adb, sem_prag.adb,
snames.ads-tmpl, switch-c.adb, types.ads, checks.adb: Change pragma
Overflow_Checks to Overflow_Mode.
Separate overflow checking from overflow mode.
Several name changes to reflect this separation.
CHECKED mode is renamed STRICT mode.
Arnaud Charlet [Wed, 5 Dec 2012 10:12:49 +0000 (11:12 +0100)]
[multiple changes]
2012-12-05 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Move setting of flags for
Alfa mode before general treatment of flags, so that overflow checks
settings are set appropriately in Alfa mode. Also set the mode to
STRICT in Alfa mode if not already set by the user.
2012-12-05 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting.
2012-12-05 Steve Baird <baird@adacore.com>
* sinfo.ads: Improve comments about SCIL-related node kinds and selector
functions.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Build_Limited_Views): Even though the unit is
not analyzed, place its entity on the name in the with clause,
so that warnings on unused with-clause are properly supported
for limited withs.
2012-12-05 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Update overflow description. Pragma
Overflow_Checks changed to Overflow_Mode.
Arnaud Charlet [Wed, 5 Dec 2012 10:10:04 +0000 (11:10 +0100)]
[multiple changes]
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Private_Type): Handle properly a
completion in a grand-child unit when the parent type is itself
a private type in a child unit whose full view is itself a
derivation from a private type.
2012-12-05 Gary Dismukes <dismukes@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case
Attribute_Valid): Remove code for issuing warning on Valid within
a predicate. Moved to Sem_Attr. Remove with and use of Errout.
* sem_attr.adb (Analyze_Attribute, case Attribute_Valid):
Test for prefix's subtype having a predicate and issue warning
about infinite recursion if Valid occurs within the subtype's
predicate. Warning moved here from Exp_Attr.
2012-12-05 Yannick Moy <moy@adacore.com>
* debug.adb: Minor comment addition.
2012-12-05 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): In CodePeer mode, check
overflows by default, even when the user suppresses overflow checks.
* sem_attr.adb (Analyze_Attribute): Do not analyze the attribute
arguments when processing Loop_Entry. Rewrite the analysis of
attribute Loop_Entry to handle an optional loop name.
(Convert_To_Indexed_Component): New routine.
(Eval_Attribute): Remove ??? comment and explain
why Loop_Entry does not need to be evaluated.
2012-12-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* testsuite-management/validate_failures.py
(IsInterestingResult): Only strip line a second time if we did split.
Rephrase return statement while at it.
(CollectSumFiles): Also ignore .git directory.
Steven Bosscher [Tue, 4 Dec 2012 18:38:26 +0000 (18:38 +0000)]
rtl.h (print_insn_with_notes): Remove prototype.
* rtl.h (print_insn_with_notes): Remove prototype.
(rtl_dump_bb_for_graph): New prototype.
* sched-vis.c (print_insn_with_notes): Make static again. Fix
printing of notes.
(rtl_dump_bb_for_graph): New function.
* cfghooks.h (struct cfg_hooks) <dump_bb_for_graph>: New hook.
(dump_bb_for_graph): New prototype.
* cfghooks.c (dump_bb_for_graph): New function.
* tree-cfg.c (gimple_cfg_hooks): Register gimple_dump_bb_for_graph
as dump_bb_for_graph hook implementation for GIMPLE.
* cfgrtl.c (rtl_cfg_hooks): Likewise for rtl_dump_bb_for_graph.
(cfg_layout_rtl_cfg_hooks): Likewise.
* graph.c (draw_cfg_node): Don't include sbitmap.h, rtl.h, tree.h,
gimple.h, and gimple-pretty-print.h.
(draw_cfg_node, draw_cfg_node_succ_edges): Use the uniqe function
definition number instead of the function declaration UID.
(print_graph_cfg): Take a struct function instead of a tree.
Use the dump_bb_for_graph hook to dump the basic block content.
* graph.h (print_graph_cfg): Update prototype.
* passes.c (execute_function_dump): Update print_graph_cfg call.
* Makefile.in (graph.o): Fixup dependencies.
Jakub Jelinek [Tue, 4 Dec 2012 13:21:11 +0000 (14:21 +0100)]
re PR testsuite/55587 ([ASAN] Testsuite test c-c++-common/asan/memcmp-1.c fails to link on targets without libasan/libsanitizer)
PR testsuite/55587
* lib/asan-dg.exp (asan_init): Return 1 if libasan has been found,
0 if not.
* g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init]
returned 0.
* gcc.dg/asan/asan.exp: Likewise.
Richard Biener [Tue, 4 Dec 2012 09:19:05 +0000 (09:19 +0000)]
re PR tree-optimization/55124 (ICE in find_or_generate_expression, at tree-ssa-pre.c:2803)
2012-12-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/55124
* tree-ssa-pre.c (find_or_generate_expression): Instead of
ICEing when we are not able to generate an expression defer it
by signalling failure. Fix possible wrong-code issue by
not picking random REFERENCE expressions as fallback.
(create_component_ref_by_pieces_1): Adjust. Add failure paths.
(create_expression_by_pieces): Likewise.
(insert_into_preds_of_block): When expression generation failed
for one edge make sure to not insert a PHI node.
Eric Botcazou [Tue, 4 Dec 2012 09:05:49 +0000 (09:05 +0000)]
ia64.c (ia64_compute_frame_size): Allocate the scratch area if the function allocates dynamic stack space.
* config/ia64/ia64.c (ia64_compute_frame_size): Allocate the scratch
area if the function allocates dynamic stack space.
(ia64_initial_elimination_offset): Adjust offsets to above change.
Steven Bosscher [Mon, 3 Dec 2012 23:28:42 +0000 (23:28 +0000)]
gcse.c (struct reg_use): Remove unused struct.
* gcse.c (struct reg_use): Remove unused struct.
(gcse_emit_move_after): Do not create REG_EQUAL notes that reference
the SET_DEST of the instruction the note would be attached to.
* cse.c (cse_main): Add the DF_NOTE problem.
Janus Weil [Mon, 3 Dec 2012 22:06:41 +0000 (23:06 +0100)]
re PR fortran/55548 (SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt))
2012-12-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/55548
* intrinsics/system_clock.c (gf_gettime_mono): Add argument 'tck',
which returns the clock resolution.
(system_clock_4): Get resolution from gf_gettime_mono, but limit to
1000/s.
(system_clock_8): Get resolution from gf_gettime_mono.
2012-12-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/55548
* intrinsic.texi (SYSTEM_CLOCK): Update documentation of SYSTEM_CLOCK.
Tobias Burnus [Mon, 3 Dec 2012 21:13:42 +0000 (22:13 +0100)]
re PR fortran/37336 ([F03] Finish derived-type finalization)
2012-12-03 Tobias Burnus <burnus@net-b.de>
Janus Weil <janus@gcc.gnu.org>
PR fortran/37336
* class.c (gfc_is_finalizable): New function.
* gfortran.h (gfc_is_finalizable): Its prototype.
* module.c (mio_component): Read initializer for vtype's _final.
* resolve.c (resolve_fl_derived0): Call gfc_is_finalizable.
* trans-expr.c (gfc_vtable_final_get): New function.
(conv_parent_component_references): Fix comment.
(gfc_conv_variable): Fix for scalar coarray components.
* trans-intrinsic.c (conv_intrinsic_move_alloc): For BT_CLASS,
pass the BT_CLASS type and not the declared type to
gfc_deallocate_scalar_with_status.
* trans.h (gfc_vtable_final_get): New prototype.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r194104
Jakub Jelinek [Mon, 3 Dec 2012 17:28:10 +0000 (18:28 +0100)]
sanitizer.def: Add Address Sanitizer builtins.
* sanitizer.def: Add Address Sanitizer builtins.
Rename BUILT_IN_TSAN_READ_* to BUILT_IN_TSAN_READ* and
BUILT_IN_TSAN_WRITE_* to BUILT_IN_TSAN_WRITE*.
* Makefile.in (asan.o): Depend on langhooks.h.
(tsan.o): Depend on asan.h.
* asan.h (initialize_sanitizer_builtins): New prototype.
* asan.c: Include langhooks.h.
(report_error_func): Use builtin_decl_implicit of corresponding
BUILT_IN_ASAN_REPORT_{LOAD,STORE}*.
(asan_init_func): Removed.
(initialize_sanitizer_builtins): New function.
(asan_finish_file): Call it. Use builtin_decl_implicit
on BUILT_IN_ASAN_{INIT,{,UN}REGISTER_GLOBALS}.
(asan_instrument): Call initialize_sanitizer_builtins.
* builtins.def (DEF_SANITIZER_BUILTIN): Change condition to
(flag_asan || flag_tsan).
* tsan.c: Include asan.h and tsan.h.
(get_memory_access_decl): Rename BUILT_IN_TSAN_{READ,WRITE}_*
to BUILT_IN_TSAN_{READ,WRITE}*.
(tsan_pass): Call initialize_sanitizer_builtins.
(tsan_gate, tsan_gate_O0): Don't check if
builtin_decl_implicit_p (BUILT_IN_TSAN_INIT) is true.
(tsan_finish_file): Call initialize_sanitizer_builtins.
* builtin-types.def (BT_FN_VOID_PTR_PTRMODE): New fn type.
Jakub Jelinek [Mon, 3 Dec 2012 17:19:47 +0000 (18:19 +0100)]
re PR bootstrap/55380 (All search_line_fast implementations read beyond buffer)
PR bootstrap/55380
PR other/54691
* files.c (read_file_guts): Allocate extra 16 bytes instead of
1 byte at the end of buf. Pass size + 16 instead of size
to _cpp_convert_input.
* charset.c (_cpp_convert_input): Reallocate if there aren't
at least 16 bytes beyond to.len in the buffer. Clear 16 bytes
at to.text + to.len.
Aldy Hernandez [Mon, 3 Dec 2012 16:11:21 +0000 (16:11 +0000)]
re PR middle-end/55401 (uninstrumented path in TM clones are still instrumented)
PR middle-end/55401
* trans-mem.c (get_tm_region_blocks): Exclude uninstrumented
blocks from vector if requested.
(collect_bb2reg): Pass new argument to
get_tm_region_blocks.
(get_bb_regions_instrumented): Add INCLUDE_UNINSTRUMENTED_P
argument, and pass it to expand_regions.
(execute_tm_mark): Pass new argument to
get_bb_regions_instrumented.
(execute_tm_edges): Same.