2014-07-16 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute/cases Pred
and Succ): Always enable range check on fixed-point types if
not suppressed for the type.
2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (State_Has_Enabled_Property):
Account for an external property denoted by an others choice.
From-SVN: r212647
2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
* exp_ch7.adb (Process_Declarations): There is no need to check
that a transient object being hooked is controlled as it would
not have been hooked in the first place.
* exp_ch9.adb Remove with and use clause for Exp_Ch4.
* exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
(Is_Aliased): A renaming of a transient controlled object is
not considered aliasing when it occurs within an expression
with actions.
(Requires_Cleanup_Actions): There is no need to
check that a transient object being hooked is controlled as it
would not have been hooked in the first place.
* exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
the outer level of routine Analyze_Aspect_Specifications. Ensure
that the corresponding pragmas of aspects Initial_Condition and
Initializes are inserted after pragma SPARK_Mode.
2014-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Update): Handle
properly a choice list with more than one choice, where each
is an aggregate denoting a sequence of array indices for a
multidimentional array. For SPARK use.
From-SVN: r212646
2014-07-16 Vadim Godunko <godunko@adacore.com>
* a-coinho-shared.adb (Adjust): Create
copy of internal shared object and element when source container
is locked.
(Copy): Likewise.
(Query_Element): Likewise.
(Update_Element): Likewise.
(Constant_Reference): Likewise. Raise Constraint_Error on attempt
to get reference for empty holder.
(Reference): Likewise.
2014-07-16 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
from Process_Transient_Oject.
* exp_ch4.ads: Ditto.
* exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
declaration as an action on the topmost enclosing expression,
not on a possibly conditional subexpreession.
From-SVN: r212645
2014-07-16 Robert Dewar <dewar@adacore.com>
* a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
reformatting.
2014-07-16 Ed Schonberg <schonberg@adacore.com>
* a-cohase.ads: Type Iterator must be controlled, so that the
tampering bit is properly set through an iteration.
* a-cohase.adb: Add Finalize operation for type Iterator.
From-SVN: r212643
When a system macro is expanded in a non-system file during
out-of-line preprocessing, it can happen that the preprocessor forgets
to emit line markers to express the system-ness status of tokens that
come after the expansion of the macro.
That can lead to situations where the entire non-system file can be
considered as being a system file and thus have its warnings be
discarded during the compilation of the resulting preprocessed file.
My understanding is that this is due to the preprocessor not
systematically detecting (and reporting) the change in system-ness of
tokens.
And this is what this patch does. Each time the system-ness of a
given token is different from the previous token that was emitted by
the preprocessor, it emits a line marker for the sole purpose of
marking the new system-ness of the subsequent tokens to come.
Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.
gcc/c-family/ChangeLog:
* c-ppoutput.c (struct print::prev_was_system_token): New data
member.
(init_pp_output): Initialize it.
(maybe_print_line_1, maybe_print_line, print_line_1, print_line)
(do_line_change): Return a flag saying if a line marker was
emitted or not.
(scan_translation_unit): Detect if the system-ness of the token we
are about to emit is different from the one of the previously
emitted token. If so, emit a line marker. Avoid emitting useless
adjacent line markers. Avoid emitting line markers for tokens
originating from the expansion of built-in macros.
(scan_translation_unit_directives_only): Adjust.
gcc/testsuite/ChangeLog:
* gcc.dg/cpp/syshdr{4,5}.{c,h}: New test files.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
From-SVN: r212638
When a built-in macro is expanded, the location of the token in the
epansion list is the location of the expansion point of the built-in
macro.
This patch creates a virtual location for that token instead,
effectively tracking locations of tokens resulting from built-in macro
tokens.
libcpp/
* include/line-map.h (line_maps::builtin_location): New data
member.
(line_map_init): Add a new parameter to initialize the new
line_maps::builtin_location data member.
* line-map.c (linemap_init): Initialize the
line_maps::builtin_location data member.
* macro.c (builtin_macro): Create a macro map and track the token
resulting from the expansion of a built-in macro.
gcc/
* input.h (is_location_from_builtin_token): New function
declaration.
* input.c (is_location_from_builtin_token): New function
definition.
* toplev.c (general_init): Tell libcpp what the pre-defined
spelling location for built-in tokens is.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
From-SVN: r212637
* asan.c (asan_finish_file): Use varpool_finalize_decl instead of
varpool_assemble_decl.
* varpool.c (varpool_assemble_decl): Assert that node->definition is
true.
From-SVN: r212564
PR rtl-optimization/61772
* ifcvt.c (dead_or_predicable): Check jump to be free of side
effects.
testsuite/
* gcc.dg/torture/pr61772.c: New test.
From-SVN: r212563
2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (convert_like_real): Call print_z_candidate and inform only
if permerror returns true.
From-SVN: r212560
* python/libstdcxx/v6/printers.py (SingleObjContainerPrinter): New
base class for experimental::any and experimental::optional printers.
(StdExpAnyPrinter, StdExpOptionalPrinter, StdExpStringViewPrinter):
New printers for Fundamentals TS types.
* testsuite/libstdc++-prettyprinters/libfundts.cc: New.
From-SVN: r212556
* python/libstdcxx/v6/printers.py (TemplateTypePrinter): Add type
printer for class templates.
(register_type_printers): Use TemplateTypePrinter for containers
and other class templates with default template arguments.
* testsuite/libstdc++-prettyprinters/whatis.cc: Test new recognizers.
From-SVN: r212555
PR libstdc++/61720
* include/bits/regex_executor.tcc (_Executor<>::_M_main_dispatch):
Clear match queue for next use.
* testsuite/28_regex/algorithms/regex_search/61720.cc: New file.
From-SVN: r212539