* doc/xml/manual/intro.xml: Document LWG 2442 status.
* include/std/mutex [_GLIBCXX_HAVE_TLS] (__once_call_impl): Remove.
[_GLIBCXX_HAVE_TLS] (_Once_call): Declare primary template and define
partial specialization to unpack args and forward to std::invoke.
(call_once) [_GLIBCXX_HAVE_TLS]: Use forward_as_tuple and _Once_call
instead of __bind_simple and __once_call_impl.
(call_once) [!_GLIBCXX_HAVE_TLS]: Use __invoke instead of
__bind_simple.
* testsuite/30_threads/call_once/dr2442.cc: New test.
From-SVN: r241031
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
formal entity without a parent only if the corresponding actual
entity has a different kind.
* exp_ch9.adb (Build_Class_Wide_Master): If the master is
declared locally, insert the renaming declaration after the
master declaration, to prevent access before elaboration in gigi.
From-SVN: r241029
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* contracts.adb (Analyze_Contracts): For a type declaration, analyze
an iterable aspect when present.
From-SVN: r241028
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
an instance of a formal package with defaults, when defaulted
parameters include tagged private types and array types.
2016-10-12 Tristan Gingold <gingold@adacore.com>
* restrict.ads, restrict.adb (Restricted_Profile): Adjust
comment, use Restricted_Tasking to compare restrictions.
* s-rident.ads (Profile_Name): Add Restricted_Tasking and
reorder literals.
(Profile_Info): Set restrictions for Restricted_Tasking.
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Full_Type_Declaration): Set Ghost status
of type before elaborating inherited operations, so that the
Ghost status is set properly for them.
* ghost.adb (Check_Ghost_Overriding): A ghost subprogram can
override an abstract subprogram coming from an interface
operation.
From-SVN: r241026
2016-10-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/64057
* exp_ch5.adb (Is_Non_Local_Array): Return true for every array
that is not a component or slice of an entity in the current
scope.
From-SVN: r241025
This enhances location description generation so that the generated
opcodes for integer literals are as space-efficient when HOST_WIDE_INT
is 64-bits large than when it's 32-bits large. In particular, this
reduces the size of the opcodes generated to produce big unsigned
literals using small literal integers instead.
gcc/
* dwarf2out.c (int_loc_descriptor): Generate opcodes for another
equivalent 32-bit constant (modulo 2**32) when that yields
smaller instructions.
(size_of_int_loc_descriptor): Update accordingly.
gcc/testsuite/
* gnat.dg/debug8.adb: New testcase.
From-SVN: r241024
In Ada, it is possible to have nested subprograms in the following
configuration:
procedure Parent is
type T;
[...]
procedure Child (Value : T) is
begin
[...]
end Child;
begin
[...]
end Parent;
As we currently generate debugging information for Child first before
Parent, the debug info for T appears in global scope since the DIE for
Parent does not exist yet.
This patch makes sure that when we generate early debug info for a
nested function, we trigger generation for the parent function first.
gcc/
* dwarf2out.c (dwarf2out_early_global_decl): For nested
functions, call dwarf2out_decl on the parent function first.
gcc/testsuite/
* gnat.dg/debug9.adb: New testcase.
From-SVN: r241023
* tree-ssa-propagate.c
(substitute_and_fold_dom_walker::before_dom_children): Do not
ignore ASSERT_EXPRs but only preserve them.
* tree-vrp.c (remove_range_assertions): Deal with ASSERT_EXPRs
that have been propagated into.
(vrp_finalize): Enable DCE for substitute_and_fold.
* gcc.dg/tree-ssa/vrp35.c: Adjust.
* gcc.dg/tree-ssa/vrp36.c: Likewise.
* gcc.dg/tree-ssa/vrp46.c: Likewise.
From-SVN: r241021
2016-10-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/77920
* tree-vrp.c (simplify_div_or_mod_using_ranges): Simplify.
(simplify_min_or_max_using_ranges): Pass in gsi and use it.
(simplify_abs_using_ranges): Likewise.
(simplify_conversion_using_ranges): Likewise.
(simplify_stmt_using_ranges): Adjust.
* gcc.dg/torture/pr77920.c: New testcase.
From-SVN: r241020
* common.opt (Wimplicit-fallthrough) Turn into alias to
-Wimplicit-fallthrough=3. Remove EnabledBy.
(Wimplicit-fallthrough=): New option.
* gimplify.c (warn_implicit_fallthrough_r): Use
OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough.
* doc/invoke.texi (-Wimplicit-fallthrough): Document as alias
to -Wimplicit-fallthrough=3.
(-Wimplicit-fallthrough=): Document.
gcc/c-family/
* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
* c-opts.c (sanitize_cpp_opts): Initialize
cpp_opts->cpp_warn_implicit_fallthrough.
gcc/testsuite/
* c-c++-common/Wimplicit-fallthrough-25.c: New test.
* c-c++-common/Wimplicit-fallthrough-26.c: New test.
* c-c++-common/Wimplicit-fallthrough-27.c: New test.
* c-c++-common/Wimplicit-fallthrough-28.c: New test.
* c-c++-common/Wimplicit-fallthrough-29.c: New test.
* c-c++-common/Wimplicit-fallthrough-30.c: New test.
* c-c++-common/Wimplicit-fallthrough-31.c: New test.
* c-c++-common/Wimplicit-fallthrough-32.c: New test.
* c-c++-common/Wimplicit-fallthrough-33.c: New test.
libcpp/
* include/cpplib.h (struct cpp_options): Add
cpp_warn_implicit_fallthrough.
* init.c (cpp_create_reader): Initialize it to 0.
* lex.c (fallthrough_comment_p): Handle different
cpp_warn_implicit_fallthrough levels. Whitespace fixes.
From-SVN: r241013
PR tree-optimization/77424
* tree-ssa-threadupdate.c (thread_through_all_blocks): Remove
dead conditionals. Assert that all e->aux fields are NULL.
From-SVN: r241009
2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77942
* simplify.c (gfc_simplify_cshift): Check for zero.
2016-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77942
* gfortran.dg/pr77942.f90
From-SVN: r241008
gcc/ChangeLog:
* print-rtl.c (print_rtx): Rename "i" to "idx". Split out the
operand-printing "switch" statement into...
(print_rtx_operand_code_0): ...this new function, ...
(print_rtx_operand_code_e): ...this new function, ...
(print_rtx_operand_codes_E_and_V): ...this new function, ...
(print_rtx_operand_code_i): ...this new function, ...
(print_rtx_operand_code_r): ...this new function, ...
(print_rtx_operand_code_u): ...this new function, ...
(print_rtx_operand): ...and this new function.
From-SVN: r241002
2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
* adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP.
ISALPHA: include <ctype.h> and define to isalpha for DJGPP when IN_RTS is defined.
(DIR_SEPARATOR) define to '\\' for DJGPP.
(__gnat_get_file_names_case_sensitive): return 0 for DJGPP unless
overriden in environment
(__gnat_is_absolute_path): Support MS-DOS style absolute paths for DJGPP.
(__gnat_portable_spawn): Use spewnvp for DJGPP.
(__gnat_portable_no_block_spawn): Use spawnvp for DJGPP.
(__gnat_portable_wait): Return 0 for DJGPP.
From-SVN: r240999
2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP target
(EH_MECHANISM): Define to -gcc for DJGPP
* system-djgpp.ads: New file
From-SVN: r240998
2016-10-11 Andris Pavenis <andris.pavenis@iki.fi>
* ctrl_c.c: Do not use macro SA_RESTART for DJGPP.
* gsocket.h: Do not support sockets for DJGPP.
* init.c (__gnat_install_handler): Implememt for DJGPP
* sysdep.c: Include <io.h> for DJGPP
(_setmode): Define to setmode for DJGPP
(__gnat_set_mode): Add implementation for DJGPP
(__gnat_localtime_tzoff): Use localtime_r for DJGPP
* terminals.c: Add DJGPP to list of unsupported platforms.
* env.c (__gnat_clearenv): use _gnat_unsetenv on all entries for DJGPP
From-SVN: r240997
2016-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/77924
* config/rs6000/rs6000.c (rs6000_init_builtins): Only create the
distinct __ibm128 IBM extended double type if long doubles are
128-bits and the default format for long double is IEEE 128-bit.
From-SVN: r240994
2016-10-11 Richard Biener <rguenther@suse.de>
* dwarf2out.c (DEBUG_STR_OFFSETS_SECTION): Remove conditional.
(init_sections_and_labels): Use DEBUG_DWO_STR_OFFSETS_SECTION.
(verify_die): New function.
(dwarf2out_finish): Call it.
(output_line_info): Handle case of -gsplit-dwarf without
DWARF2_ASM_LINE_DEBUG_INFO.
From-SVN: r240992
2016-10-11 Richard Biener <rguenther@suse.de>
PR debug/77931
* gimple-low.c (lower_gimple_bind): Handle arbitrary common
sub-chains of BLOCK_VARS and gimple_bind_vars.
From-SVN: r240991
Declare loop index variable j as a 32 bit int instead of assuming ints
are 32 bits. The smaller int size on the avr makes prior passes optimize
away the loop exit check (j < 10000000), as the constant is outside
the range of a 16 bit int.
gcc/testsuite/ChangeLog
2016-10-11 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/tree-ssa/pr59597.c: Typedef __INT32_TYPE__ to i32.
(main): Declare j as i32 instead of int.
From-SVN: r240986
* exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
Emit GNAT encodings for object renamings involving record components
whose normalized bit offset is not null.
* uintp.h (UI_No_Uint): Declare.
* gcc-interface/gigi.h (can_materialize_object_renaming_p): New.
* gcc-interface/utils.c (can_materialize_object_renaming_p): New
function.
* gcc-interface/trans.c (gnat_to_gnu) <N_Object_Renaming_Declaration>:
In code generation mode, materialize all renamings as long as they need
debug info and we are not optimizing.
From-SVN: r240985
* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
Register printer for std::__cxx11::list.
* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
std::__cxx11::list as well as std::list.
From-SVN: r240982
2016-10-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/testsuite/
PR testsuite/PR77710
* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Use *-*-* as catch-all
target triplet instead of *-*-*-*.
From-SVN: r240979
* gcc-interface/utils2.c (build_binary_op): Add a NO_FOLD
argument. Disable folding when true.
* gcc-interface/gigi.h (choices_to_gnu): Remove declaration.
(build_binary_op): Update signature and comment.
* gcc-interface/decl.c (choices_to_gnu): Make static. Disable
folding for all calls to build_binary_op.
From-SVN: r240978
* gcc-interface/utils.c (type_unsigned_for_rm): New predicate.
(make_type_from_size): Use it.
(unchecked_convert): Likewise. Do not skip the extension step if the
source type is not integral.
From-SVN: r240975