Commit Graph

153245 Commits

Author SHA1 Message Date
Iain Buclaw dbe65f77ff d-demangle.c (strtol): Remove declaration.
libiberty/ChangeLog:

	* d-demangle.c (strtol): Remove declaration.
	Updated all callers to use dlang_number.
	(dlang_number): New function.
	(dlang_value): Moved check for ISDIGIT into dlang_parse_integer.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247453
2017-05-01 23:31:24 +00:00
Nathan Sidwell 0aae15720e calls.c (combine_pending_stack_adjustment_and_call): Remove unnecessary unadjusted_alignment check.
* calls.c (combine_pending_stack_adjustment_and_call): Remove
	unnecessary unadjusted_alignment check.

From-SVN: r247452
2017-05-01 23:22:30 +00:00
Iain Buclaw 5a4dbf7d31 d-demangle.c (dlang_parse_symbol): Remove function.
libiberty/ChangeLog:

	* d-demangle.c (dlang_parse_symbol): Remove function.
	(dlang_parse_qualified): New function.
	(dlang_parse_mangle): New function.
	(dlang_type): Update to call dlang_parse_qualified.
	(dlang_identifier): Update to call either dlang_parse_qualified or
	dlang_parse_mangle.
	(dlang_type_modifier_p): Remove function.
	(dlang_call_convention_p): Don't allow type modifiers in mangle.
	(dlang_template_args): Update to call dlang_identifier.
	(dlang_demangle): Update to call dlang_parse_mangle.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247450
2017-05-01 22:51:04 +00:00
Joseph Myers 5166bee456 Regenerate .pot files.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r247447
2017-05-01 23:28:02 +01:00
Xi Ruoyao 815d9cc664 re PR c++/80038 (Random segfault using local vectors in Cilk function)
2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>

        PR c++/80038
	* cilk_common.c (expand_builtin_cilk_detach): Move pedigree
	operations here.
	* gimplify.c (gimplify_cilk_detach): New function.
	(gimplify_call_expr, gimplify_modify_expr): Call it as needed.
	* tree-core.h: Document EXPR_CILK_SPAWN.
	* tree.h (EXPR_CILK_SPAWN): Define.

        PR c++/80038
	* c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
	prototype.
	(cilk_install_body_pedigree_operations): Likewise.
	* cilk.c (cilk_set_spawn_marker): Mark functions that should be
	detatched.
	(cilk_gimplify_call_params_in_spawned_fn): Remove.
	(cilk_install_body_pedigree_operations): Likewise.
	(gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
	unwrapping.

        PR c++/80038
	* c-gimplify.c (c_gimplify_expr): Remove calls to
	cilk_gimplifY_call_params_in_spawned_fn.

        PR c++/80038
	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't
	add pedigree operation and detach call here.
	* cp-gimplify.c (cp_gimplify_expr): Remove the calls to
	cilk_cp_gimplify_call_params_in_spawned_fn.
	(cilk_cp_gimplify_call_params_in_spawned_fn): Remove function.
	* semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN.

        PR c++/80038
	* lto-lang.c (lto_init): Set in_lto_p earlier.

	PR c++/80038
	* g++.dg/cilk-plus/CK/pr80038.cc: New test.

From-SVN: r247446
2017-05-01 16:26:02 -06:00
David Malcolm 338035aa19 Eliminate fixit_hint class hierarchy
The original implementation of fix-it hints (r230674) had an abstract
base class "fixit_hint" and three subclasses, representing
each of insertions, replacements, and deletions.

Having multiple classes for fix-it hints was a nuisance, as it required
per-class logic everywhere that the hints were handled.

In r239632 I eliminated the deletion subclass in favor of replacement
with the empty string (two subclasses are easier than three).

This patch eliminates the class hierarchy altogether by implementing
insertion in terms of replacement, by representing replacements via
a half-open interval (so that for an insertion, start == next location,
and we're effectively replacing an empty range at the insertion point
with the new string).

This greatly simplifies the code for handling fix-it hints; for example
it allows removal of a parallel class hierarchy of line_event within
edit-context.c.

It also improves consolidation of hints: we can now consolidate
insertions at the same location, affecting a couple of tests
(selftest::test_one_liner_many_fixits and
gcc.dg/Wmissing-braces-fixits.c).

gcc/ChangeLog:
	* diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
	to use new fixit_hint representation, using the "replace" logic.
	(get_line_span_for_fixit_hint): Likewise.
	(layout::print_any_fixits): Likewise.
	(selftest::test_one_liner_many_fixits): Rename to...
	(selftest::test_one_liner_many_fixits_1): ...this, and update
	comment and expected output to reflect that the multiple fix-it
	hints are now consolidated into one insertion.
	(selftest::test_one_liner_many_fixits_2): New test.
	(selftest::test_diagnostic_show_locus_one_liner): Update for
	above.
	(selftest::test_fixit_consolidation): Update for fix-it API
	change.
	* diagnostic.c (print_parseable_fixits): Likewise.
	* edit-context.c (edited_line::m_line_events): Convert from
	auto_vec <line_event *> to auto_vec <line_event>.
	(class line_event): Convert from abstract base class to a concrete
	class, taking over the role of replace_event.
	(class insert_event): Delete.
	(class replace_event): Rename to class line_event.  Convert to
	half-open range.
	(edit_context::add_fixits): Reimplement.
	(edit_context::apply_insert): Delete.
	(edit_context::apply_replace): Rename to...
	(edit_context::apply_fixit): ...this.  Convert to half-open range.
	(edited_file::apply_insert): Delete.
	(edited_file::apply_replace): Rename to...
	(edited_file::apply_fixit): ...this.
	(edited_line::~edited_line): Drop deletion of events.
	(edited_line::apply_insert): Delete.
	(edited_line::apply_replace): Rename to...
	(edited_line::apply_fixit): ...this.  Convert to half-open range.
	Update for change to type of m_line_events.
	* edit-context.h (edit_context::apply_insert): Delete.
	(edit_context::apply_replace): Rename to...
	(edit_context::apply_fixit): ...this.

gcc/testsuite/ChangeLog:
	* gcc.dg/Wmissing-braces-fixits.c: Update expected output to
	reflect insertion fix-it hints at the same location now being
	consolidated.

libcpp/ChangeLog:
	* include/line-map.h (source_range::intersects_line_p): Delete.
	(rich_location::add_fixit): Delete.
	(rich_location::maybe_add_fixit): New method.
	(class fixit_hint): Reimplement in terms of...
	(class fixit_replace): ...this.
	(class fixit_insert): Delete.
	* line-map.c (linemap_position_for_loc_and_offset): Drop overzealous
	linemap_assert_fails.
	(source_range::intersects_line_p): Rename to...
	(fixit_hint::affects_line_p): New function.
	(rich_location::add_fixit_insert_before): Reimplement in terms of
	maybe_add_fixit, moving validation there.
	(rich_location::add_fixit_insert_after): Likewise.
	(column_before_p): Delete.
	(rich_location::add_fixit_replace): Reimplement in terms of
	maybe_add_fixit, moving validation there.  Convert closed input range
	to half-open range.
	(rich_location::add_fixit): Delete.
	(rich_location::maybe_add_fixit): New function.
	(fixit_insert::fixit_insert): Delete.
	(fixit_insert::~fixit_insert): Delete.
	(fixit_insert::affects_line_p): Delete.
	(fixit_insert::maybe_append_replace): Delete.
	(fixit_replace::fixit_replace): Rename to...
	(fixit_hint::fixit_hint): ...this, rewriting as necessary.
	(fixit_replace::~fixit_replace): Delete.
	(fixit_replace::affects_line_p): Delete.
	(fixit_replace::maybe_append_replace): Rename to...
	(fixit_hint::maybe_append): ...this, rewriting as necessary.

From-SVN: r247445
2017-05-01 19:15:36 +00:00
Martin Sebor 4d82d0bc43 gimple-ssa-sprintf.c (format_integer): Set knownrange when it's known.
gcc/ChangeLog:
	* gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
	known.

gcc/testsuite/ChangeLog:
	* tree-ssa/builtin-sprintf-warn-18.c: Adjust to avoid failures
	on ILP32 targets.

From-SVN: r247444
2017-05-01 12:45:46 -06:00
Tom de Vries d539a57b06 Require linker plugin for pr78768.c
The test-case has an xfail-ed line.  For linkers without plugin support, that
line happens to xpass.  Require linker with plugin support, such that the line
is no longer xpass-ing, but unsupported.

2017-05-01  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/pr78768.c: Require linker plugin.

From-SVN: r247443
2017-05-01 18:31:07 +00:00
Thomas Koenig c6b9e849c0 re PR fortran/37131 (inline matmul for small matrix sizes)
2017-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/37131
	* frontend-passes.c (inline_matmul_assign): Also check bounds
	for allocatable lhs and matrix-vector-multiplication.

2017-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/37131
	* gfortran.dg/matmul_bounds_11.f90:  New test.

From-SVN: r247441
2017-05-01 17:45:52 +00:00
Martin Sebor 706eb1a70d re PR tree-optimization/79715 (hand-rolled strdup with unused result not eliminated)
gcc/testsuite/ChangeLog:
	PR tree-optimization/79715
	* gcc.dg/pr79715.c: New test.

From-SVN: r247440
2017-05-01 10:46:49 -06:00
Uros Bizjak a6c78ea303 re PR target/68491 (libgcc calls __get_cpuid with 0 level breaks on early 486)
PR target/68491
	* config/i386/cpuid.h (__get_cpuid): Always return 0 when
	__get_cpuid_max returns 0.
	(__get_cpuid_count): Ditto.

From-SVN: r247439
2017-05-01 17:38:14 +02:00
Tom de Vries 723f4140da Add and use effective target rdrand
2017-05-01  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/65941
	* lib/target-supports.exp (check_effective_target_rdrand): New proc.
	* g++.dg/other/pr59492.C: Require effective target rdrand.

From-SVN: r247438
2017-05-01 14:15:33 +00:00
Iain Buclaw dd03444ba5 d-demangle.c (dlang_value): Add comment explaining why cases for digits are required.
libiberty/ChangeLog:

	* d-demangle.c (dlang_value): Add comment explaining why cases for
	digits are required.
	* testsuite/d-demangle-expected: Update integer value tests.

From-SVN: r247436
2017-05-01 11:01:02 +00:00
Iain Buclaw 98bb7ee2da d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.
libiberty/ChangeLog:

	* d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247434
2017-05-01 10:50:58 +00:00
Iain Buclaw c6f44bae7e d-demangle.c (dlang_identifier): Handle template constraint symbols.
libiberty/ChangeLog:

	* d-demangle.c (dlang_identifier): Handle template constraint symbols.
	(dlang_parse_template): Only advance if template symbol prefix is
	followed by a digit.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247433
2017-05-01 10:45:35 +00:00
Iain Buclaw ec89d258a0 d-demangle.c (dlang_attributes): Handle scope attributes.
libiberty/ChangeLog:

	* d-demangle.c (dlang_attributes): Handle scope attributes.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247432
2017-05-01 10:39:52 +00:00
Eric Botcazou 3a324b98c5 tree.c (substitute_in_expr): Also inline a call if the replacement expression is another instance of one of...
* tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
	replacement expression is another instance of one of its arguments.

From-SVN: r247431
2017-05-01 10:18:18 +00:00
Jakub Jelinek 30776a1468 re PR target/79430 (action of statement incorrectly optimised away)
PR target/79430
	* rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
	check for stack push/pop autoinc.
	* config/i386/i386.c (ix86_agi_dependent): Return false
	if the only reason why modified_in_p returned true is that
	addr is SP based and set_insn is a push or pop.

From-SVN: r247429
2017-05-01 11:50:59 +02:00
Eric Botcazou f16b9dc289 Add missing entry
From-SVN: r247428
2017-05-01 08:28:05 +00:00
Eric Botcazou a01ebdf516 * gcc-interface/decl.c (components_to_record): Add missing guard.
From-SVN: r247427
2017-05-01 08:24:40 +00:00
Eric Botcazou 0a69d9bdc7 decl.c (components_to_record): Add more comments.
* gcc-interface/decl.c (components_to_record): Add more comments.
	Put back pending fields onto the regular list if the misalignment
	happens to cancel itself.

From-SVN: r247426
2017-05-01 08:12:31 +00:00
GCC Administrator 8d70063658 Daily bump.
From-SVN: r247425
2017-05-01 00:16:32 +00:00
Joseph Myers 5bda45cddb * fr.po: Update.
From-SVN: r247420
2017-05-01 00:20:45 +01:00
Joseph Myers ade6191208 * fr.po: Update.
From-SVN: r247418
2017-05-01 00:16:03 +01:00
Jan Hubicka 4adaad6496 re PR tree-optimization/79224 (Large C-Ray slowdown)
PR ipa/79224
	* ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
	(account_size_time): Use two predicates - exec_pred and
	nonconst_pred_ptr.
	(evaluate_conditions_for_known_args): Compute both clause and
	nonspec_clause.
	(evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
	(inline_summary_t::duplicate): Update.
	(estimate_function_body_sizes): Caluculate exec and nonconst predicates
	separately.
	(compute_inline_parameters): Likewise.
	(estimate_edge_size_and_time): Update caluclation of time.
	(estimate_node_size_and_time): Compute both time and nonspecialized
	time.
	(estimate_ipcp_clone_size_and_time): Update.
	(inline_merge_summary): Update.
	(do_estimate_edge_time): Update.
	(do_estimate_edge_size): Update.
	(do_estimate_edge_hints): Update.
	(inline_read_section, inline_write_summary): Stream both new predicates.
	* ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
	as argument.
	(compute_inlined_call_time): Cleanup.
	(big_speedup_p): Update.
	(edge_badness): Update.
	* ipa-inline.h (INLINE_TIME_SCALE): Remove.
	(size_time_entry): Replace predicate by exec_predicate and
	nonconst_predicate.
	(edge_growth_cache_entry): Cache both time nad nonspecialized time.
	(estimate_edge_time): Return also nonspec_time.
	(reset_edge_growth_cache): Update.

From-SVN: r247417
2017-04-30 15:02:11 +00:00
GCC Administrator 8cbe7981c6 Daily bump.
From-SVN: r247416
2017-04-30 00:16:25 +00:00
Volker Reichelt 6bbb3a69ef parser.c (cp_parser_member_declaration): Add fix-it hints for stray comma and missing semicolon at end of member declaration.
* parser.c (cp_parser_member_declaration): Add fix-it hints for
        stray comma and missing semicolon at end of member declaration.

        * g++.dg/diagnostic/member-decl-1.C: New test.

From-SVN: r247412
2017-04-29 22:27:13 +00:00
François Dumont 30fc569c18 48362.cc: Replace a regexp-test by a note-test.
2017-04-29  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/libstdc++-prettyprinters/48362.cc: Replace a regexp-test
	by a note-test.

From-SVN: r247411
2017-04-29 19:35:28 +00:00
Jakub Jelinek cc3a5b33ba re PR rtl-optimization/80491 (Compiler regression for long-add case.)
PR rtl-optimization/80491
	* ifcvt.c (noce_process_if_block): When looking for x setter
	with missing else_bb, don't check only the insn right before
	cond_earliest, but look for the last insn that x is modified in
	within the same bb.

From-SVN: r247410
2017-04-29 18:18:11 +02:00
Jakub Jelinek bc36c711da re PR rtl-optimization/80491 (Compiler regression for long-add case.)
PR rtl-optimization/80491
	* alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.

From-SVN: r247409
2017-04-29 18:17:13 +02:00
Marc Glisse 4212aecdf8 Add st[pr]ncpy to stmt_kills_ref_p
2017-04-29  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/80487
gcc/
	* tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.

gcc/testsuite/
	* gcc.dg/tree-ssa/strncpy-1.c: New file.

From-SVN: r247408
2017-04-29 14:39:25 +00:00
Prathamesh Kulkarni fe75f73248 re PR tree-optimization/79697 (unused realloc(0, n) not eliminated)
2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR tree-optimization/79697
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
	is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
	(propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
	BUILT_IN_STRNDUP.
	* gimple-fold.c (gimple_fold_builtin_realloc): New function.
	(gimple_fold_builtin): Call gimple_fold_builtin_realloc.

testsuite/
	* gcc.dg/tree-ssa/pr79697.c: New test.

From-SVN: r247407
2017-04-29 10:05:13 +00:00
Tom de Vries 6bcd876838 Require effective target avx512f for tree-prof/pr66295.c
2017-04-29  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/tree-prof/pr66295.c: Require effective target avx512f.

From-SVN: r247406
2017-04-29 08:39:40 +00:00
GCC Administrator 8745d6ebb4 Daily bump.
From-SVN: r247405
2017-04-29 00:16:21 +00:00
Martin Sebor d127ae9fbe PR tree-optimization/80523 - -Wformat-overflow doesn't consider -fexec-charset
gcc/ChangeLog:

	PR tree-optimization/80523
	* gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
	(init_target_to_host_charmap, target_to_host, target_strtol10): New
	functions.
	(maybe_warn, format_directive, parse_directive): Use new functions.
	(pass_sprintf_length::execute): Call init_target_to_host_charmap.

gcc/testsuite/ChangeLog:

	PR tree-optimization/80523
	* gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: New test.

From-SVN: r247401
2017-04-28 16:29:40 -06:00
Tom de Vries c961093393 Replace absolute linenrs in gfortran.dg
2017-04-28  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80557
	* gfortran.dg/gomp/appendix-a/a.24.1.f90: Replace absolute linenrs.
	* gfortran.dg/gomp/appendix-a/a.31.3.f90: Same.

From-SVN: r247400
2017-04-28 21:52:16 +00:00
Tom de Vries b5be38bc30 Replace absolute linenrs in objc.dg,obj-c++.dg
2017-04-28  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80557
	* obj-c++.dg/bitfield-1.mm: Replace absolute linenrs.
	* obj-c++.dg/bitfield-4.mm: Same.
	* obj-c++.dg/bitfield-5.mm: Same.
	* obj-c++.dg/exceptions-3.mm: Same.
	* obj-c++.dg/exceptions-5.mm: Same.
	* obj-c++.dg/method-1.mm: Same.
	* obj-c++.dg/method-12.mm: Same.
	* obj-c++.dg/method-13.mm: Same.
	* obj-c++.dg/method-15.mm: Same.
	* obj-c++.dg/method-16.mm: Same.
	* obj-c++.dg/property/at-property-18.mm: Same.
	* obj-c++.dg/property/at-property-25.mm: Same.
	* obj-c++.dg/property/at-property-5.mm: Same.
	* obj-c++.dg/property/dynamic-2.mm: Same.
	* obj-c++.dg/property/property-neg-3.mm: Same.
	* obj-c++.dg/protocol-inheritance-1.mm: Same.
	* obj-c++.dg/protocol-inheritance-2.mm: Same.
	* obj-c++.dg/syntax-error-1.mm: Same.
	* obj-c++.dg/try-catch-13.mm: Same.
	* objc.dg/bitfield-4.m: Same.
	* objc.dg/class-1.m: Same.
	* objc.dg/method-11.m: Same.
	* objc.dg/method-6.m: Same.
	* objc.dg/method-7.m: Same.
	* objc.dg/method-9.m: Same.
	* objc.dg/missing-proto-3.m: Same.
	* objc.dg/naming-2.m: Same.
	* objc.dg/property/at-property-16.m: Same.
	* objc.dg/property/at-property-18.m: Same.
	* objc.dg/property/at-property-25.m: Same.
	* objc.dg/property/at-property-5.m: Same.
	* objc.dg/property/dynamic-2.m: Same.
	* objc.dg/property/property-neg-3.m: Same.
	* objc.dg/protocol-inheritance-1.m: Same.
	* objc.dg/protocol-inheritance-2.m: Same.

From-SVN: r247399
2017-04-28 21:24:00 +00:00
Marc Glisse d35256b6c1 Drop Z from X + Z < Y + Z
2017-04-28  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.

gcc/testsuite/
	* gcc.dg/tree-ssa/cmpexactdiv-2.c: Update for X-Z OP Y-Z.

From-SVN: r247398
2017-04-28 20:51:05 +00:00
Bernd Edlinger 0c90d48b34 configure.ac (SYSTEM_HEADER_DIR, [...]): Set correctly.
2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
        target_header_dir): Set correctly.
        * configure: Regenerated.
        * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
        (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
        instead of SYSTEM_HEADER_DIR.

From-SVN: r247397
2017-04-28 20:15:00 +00:00
Eric Botcazou 4accc82353 Remove blank line
From-SVN: r247395
2017-04-28 17:10:02 +00:00
Joseph Myers e53603efd4 Update .po files.
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
	zh_TW.po: Update.

From-SVN: r247394
2017-04-28 17:16:03 +01:00
Arnaud Charlet 40b4bc2da1 [multiple changes]
2017-04-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Complete_Object_Operation): When rewriting the
	controlling actual in a prefixed call, preserve the original node
	information if the prefix itself has been rewritten, for ASIS use.

2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Insert_Post_Call_Actions):
	Code clean up. Insert the post-call actions after an enclosing
	procedure call when N denotes a function call and appears as an
	actual parameter in the procedure call.

2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>

	* freeze.adb (Check_Component_Storage_Order): If there is a clause
	for the component, also reject the attribute if the component
	doesn't end on a byte boundary and its scalar storage order is
	different from that of the enclosing record type.

From-SVN: r247391
2017-04-28 15:48:59 +02:00
Arnaud Charlet 66c19cd4fd [multiple changes]
2017-04-28  Javier Miranda  <miranda@adacore.com>

	* atree.ads (Info_Messages): Removed.
	(Warning_Info_Messages): New counter.
	(Report_Info_Messages): New counter.
	* err_vars.ads Update documentation.
	* errout.adb (Delete_Warning_And_Continuations): Update
	Info_Message occurrences.
	(Error_Msg_Internal): Update Info_Message occurrences.
	(Delete_Warning): Update Info_Message occurrences.
	(Write_Error_Summary): Update Info_Message occurrences.
	(Output_Messages): Update Info_Message occurrences.
	(To_Be_Removed): Update Info_Message occurrences.
	(Reset_Warnings): Update Info_Message occurrences.
	* errutil.adb (Error_Msg): Update Info_Message occurrences.
	(Finalize): Update Info_Message occurrences.
	(Initialize): Update Info_Message occurrences.
	* erroutc.adb (Delete_Msg): Update Info_Message occurrences.
	(Compilation_Errors): Update Info_Message_Occurences.

2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>

        * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
        * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
        * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
        * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
        * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
        * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
        Y_Size.
        * sem_eval.adb (Why_Not_Static): Initialize Typ.
        * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.

From-SVN: r247390
2017-04-28 15:47:23 +02:00
Tom de Vries 7a95dfa774 Remove superfluous "" in dg-(error|warning|message|bogus)
find $(find -type d -name testsuite) -type f \
     | xargs sed -ri 's#(dg-(error|warning|message|bogus).*)" "" \}#\1" }#'

2017-04-28  Tom de Vries  <tom@codesourcery.com>

	* g++.dg/abi/bitfield3.C: Remove superfluous "" in
	dg-(error|warning|message|bogus).
	* g++.dg/conversion/dr195-1.C: Same.
	* g++.dg/conversion/dr195.C: Same.
	* g++.dg/cpp0x/constexpr-reinterpret1.C: Same.
	* g++.dg/cpp0x/gen-attrs-14.C: Same.
	* g++.dg/cpp0x/inline-ns7.C: Same.
	* g++.dg/cpp0x/variadic105.C: Same.
	* g++.dg/cpp0x/variadic65.C: Same.
	* g++.dg/expr/call2.C: Same.
	* g++.dg/expr/member-of-incomplete-type-1.C: Same.
	* g++.dg/expr/pmf-1.C: Same.
	* g++.dg/ext/altivec-types-1.C: Same.
	* g++.dg/ext/altivec-types-2.C: Same.
	* g++.dg/ext/altivec-types-3.C: Same.
	* g++.dg/ext/attrib14.C: Same.
	* g++.dg/ext/complit1.C: Same.
	* g++.dg/ext/forscope2.C: Same.
	* g++.dg/ext/gnu-inline-global-reject.C: Same.
	* g++.dg/ext/label13.C: Same.
	* g++.dg/ext/member-attr.C: Same.
	* g++.dg/ext/visibility/anon7.C: Same.
	* g++.dg/ext/visibility/visibility-7.C: Same.
	* g++.dg/ext/vla2.C: Same.
	* g++.dg/inherit/access2.C: Same.
	* g++.dg/inherit/covariant12.C: Same.
	* g++.dg/inherit/covariant14.C: Same.
	* g++.dg/inherit/namespace-as-base.C: Same.
	* g++.dg/inherit/template-as-base.C: Same.
	* g++.dg/lookup/ambig1.C: Same.
	* g++.dg/lookup/ambig2.C: Same.
	* g++.dg/lookup/ambig3.C: Same.
	* g++.dg/lookup/class-member-1.C: Same.
	* g++.dg/lookup/conv-1.C: Same.
	* g++.dg/lookup/decl1.C: Same.
	* g++.dg/lookup/koenig1.C: Same.
	* g++.dg/lookup/scoped1.C: Same.
	* g++.dg/lookup/scoped2.C: Same.
	* g++.dg/lookup/two-stage4.C: Same.
	* g++.dg/lookup/used-before-declaration.C: Same.
	* g++.dg/lookup/using.C: Same.
	* g++.dg/lookup/using17.C: Same.
	* g++.dg/lookup/using2.C: Same.
	* g++.dg/other/abstract2.C: Same.
	* g++.dg/other/classkey1.C: Same.
	* g++.dg/other/component1.C: Same.
	* g++.dg/other/const1.C: Same.
	* g++.dg/other/const2.C: Same.
	* g++.dg/other/conversion1.C: Same.
	* g++.dg/other/do1.C: Same.
	* g++.dg/other/error1.C: Same.
	* g++.dg/other/error10.C: Same.
	* g++.dg/other/error3.C: Same.
	* g++.dg/other/error4.C: Same.
	* g++.dg/other/error5.C: Same.
	* g++.dg/other/error8.C: Same.
	* g++.dg/other/error9.C: Same.
	* g++.dg/other/field1.C: Same.
	* g++.dg/other/init1.C: Same.
	* g++.dg/other/ptrmem2.C: Same.
	* g++.dg/other/return1.C: Same.
	* g++.dg/overload/builtin3.C: Same.
	* g++.dg/overload/error1.C: Same.
	* g++.dg/overload/error2.C: Same.
	* g++.dg/overload/koenig2.C: Same.
	* g++.dg/overload/pmf1.C: Same.
	* g++.dg/parse/args1.C: Same.
	* g++.dg/parse/attr3.C: Same.
	* g++.dg/parse/constant4.C: Same.
	* g++.dg/parse/crash10.C: Same.
	* g++.dg/parse/crash18.C: Same.
	* g++.dg/parse/crash19.C: Same.
	* g++.dg/parse/crash20.C: Same.
	* g++.dg/parse/crash21.C: Same.
	* g++.dg/parse/crash22.C: Same.
	* g++.dg/parse/crash32.C: Same.
	* g++.dg/parse/decl-specifier-1.C: Same.
	* g++.dg/parse/error58.C: Same.
	* g++.dg/parse/local-class1.C: Same.
	* g++.dg/parse/non-dependent2.C: Same.
	* g++.dg/parse/parameter-declaration-1.C: Same.
	* g++.dg/parse/ptrmem2.C: Same.
	* g++.dg/parse/ptrmem3.C: Same.
	* g++.dg/parse/saved1.C: Same.
	* g++.dg/tc1/dr101.C: Same.
	* g++.dg/tc1/dr142.C: Same.
	* g++.dg/tc1/dr176.C: Same.
	* g++.dg/template/conv4.C: Same.
	* g++.dg/template/crash56.C: Same.
	* g++.dg/template/dependent-expr2.C: Same.
	* g++.dg/template/error1.C: Same.
	* g++.dg/template/error2.C: Same.
	* g++.dg/template/explicit6.C: Same.
	* g++.dg/template/init-list.C: Same.
	* g++.dg/template/local1.C: Same.
	* g++.dg/template/lookup2.C: Same.
	* g++.dg/template/meminit2.C: Same.
	* g++.dg/template/nontype25.C: Same.
	* g++.dg/template/ptrmem2.C: Same.
	* g++.dg/template/qualttp19.C: Same.
	* g++.dg/template/qualttp20.C: Same.
	* g++.dg/template/ttp3.C: Same.
	* g++.dg/template/unify4.C: Same.
	* g++.dg/template/unify6.C: Same.
	* g++.dg/template/unify7.C: Same.
	* g++.dg/template/warn1.C: Same.
	* g++.dg/tree-ssa/dom-invalid.C: Same.
	* g++.dg/ubsan/shift-1.C: Same.
	* g++.dg/warn/Wunused-2.C: Same.
	* g++.dg/warn/Wunused-4.C: Same.
	* g++.dg/warn/Wunused-6.C: Same.
	* g++.dg/warn/deprecated-6.C: Same.
	* g++.dg/warn/deprecated.C: Same.
	* g++.dg/warn/effc1.C: Same.
	* g++.dg/warn/effc3.C: Same.
	* g++.dg/warn/incomplete1.C: Same.
	* g++.dg/warn/inline1.C: Same.
	* g++.dg/warn/noeffect2.C: Same.
	* g++.dg/warn/noeffect4.C: Same.
	* g++.dg/warn/oldcast1.C: Same.
	* g++.dg/warn/sentinel.C: Same.
	* g++.dg/warn/unit-1.C: Same.
	* g++.old-deja/g++.pt/inherit2.C: Same.
	* g++.old-deja/g++.pt/overload8.C: Same.
	* gcc.dg/20000926-1.c: Same.
	* gcc.dg/20040223-1.c: Same.
	* gcc.dg/Warray-bounds-7.c: Same.
	* gcc.dg/alias-1.c: Same.
	* gcc.dg/alias-12.c: Same.
	* gcc.dg/alias-13.c: Same.
	* gcc.dg/alias-2.c: Same.
	* gcc.dg/array-13.c: Same.
	* gcc.dg/array-4.c: Same.
	* gcc.dg/attr-ifunc-2.c: Same.
	* gcc.dg/attr-invalid.c: Same.
	* gcc.dg/attr-noinline.c: Same.
	* gcc.dg/bitfld-2.c: Same.
	* gcc.dg/c90-const-expr-7.c: Same.
	* gcc.dg/c99-const-expr-7.c: Same.
	* gcc.dg/cpp/20000625-1.c: Same.
	* gcc.dg/cpp/charconst-4.c: Same.
	* gcc.dg/cpp/include2.c: Same.
	* gcc.dg/cpp/include2a.c: Same.
	* gcc.dg/decl-4.c: Same.
	* gcc.dg/deprecated-4.c: Same.
	* gcc.dg/deprecated.c: Same.
	* gcc.dg/dfp/altivec-types.c: Same.
	* gcc.dg/float-range-1.c: Same.
	* gcc.dg/pack-test-3.c: Same.
	* gcc.dg/pr11492.c: Same.
	* gcc.dg/pr15360-1.c: Same.
	* gcc.dg/pr37908.c: Same.
	* gcc.dg/pr53265.c: Same.
	* gcc.dg/pr57287-2.c: Same.
	* gcc.dg/pr57287.c: Same.
	* gcc.dg/redecl-1.c: Same.
	* gcc.dg/sync-3.c: Same.
	* gcc.dg/two-types-1.c: Same.
	* gcc.dg/two-types-2.c: Same.
	* gcc.dg/two-types-4.c: Same.
	* gcc.dg/two-types-5.c: Same.
	* gcc.dg/two-types-6.c: Same.
	* gcc.dg/two-types-7.c: Same.
	* gcc.dg/two-types-8.c: Same.
	* gcc.dg/two-types-9.c: Same.
	* gcc.dg/uninit-I.c: Same.
	* gcc.dg/uninit-pr19430.c: Same.
	* gcc.dg/visibility-7.c: Same.
	* gcc.dg/winline-10.c: Same.
	* gcc.dg/winline-2.c: Same.
	* gcc.dg/winline-3.c: Same.
	* gcc.dg/winline-9.c: Same.
	* gcc.target/i386/attr-returns_twice-1.c: Same.
	* gcc.target/i386/chkp-const-check-2.c: Same.
	* gcc.target/i386/chkp-label-address.c: Same.
	* gcc.target/i386/chkp-remove-bndint-2.c: Same.
	* gcc.target/i386/pr39162.c: Same.
	* gcc.target/i386/sse-5.c: Same.
	* gcc.target/powerpc/altivec-types-1.c: Same.
	* gcc.target/powerpc/altivec-types-2.c: Same.
	* gcc.target/powerpc/altivec-types-3.c: Same.
	* gcc.target/powerpc/float128-mix.c: Same.
	* gcc.target/powerpc/no-r11-3.c: Same.
	* gcc.target/spu/Wmain.c: Same.
	* gcc.target/spu/ea/errors2.c: Same.
	* gfortran.dg/assignment_1.f90: Same.
	* gfortran.dg/common_3.f90: Same.
	* gfortran.dg/der_io_1.f90: Same.
	* gfortran.dg/g77/20030326-1.f: Same.
	* gfortran.dg/g77/9263.f: Same.
	* gfortran.dg/g77/960317-1.f: Same.
	* gfortran.dg/g77/970625-2.f: Same.
	* gfortran.dg/g77/980615-0.f: Same.
	* gfortran.dg/g77/check0.f: Same.
	* gfortran.dg/g77/dnrm2.f: Same.
	* gfortran.dg/g77/pr9258.f: Same.
	* gfortran.dg/ichar_1.f90: Same.
	* gfortran.dg/interface_1.f90: Same.
	* gfortran.dg/namelist_1.f90: Same.
	* gfortran.dg/namelist_2.f90: Same.
	* gfortran.dg/namelist_3.f90: Same.
	* gfortran.dg/namelist_print_2.f: Same.
	* gfortran.dg/oldstyle_1.f90: Same.
	* gfortran.dg/runtime_warning_1.f90: Same.
	* gfortran.dg/underflow.f90: Same.
	* gnat.dg/specs/integer_value.ads: Same.
	* obj-c++.dg/fsf-package-0.m: Same.
	* objc.dg/two-types-1.m: Same.

From-SVN: r247389
2017-04-28 13:41:35 +00:00
Arnaud Charlet b6dc26ba9b Minor reformatting.
From-SVN: r247388
2017-04-28 15:38:19 +02:00
Arnaud Charlet 85be939ea9 [multiple changes]
2017-04-28  Bob Duff  <duff@adacore.com>

	* sem_util.ads, sem_util.adb (Might_Raise): New function
	that replaces Is_Exception_Safe, but has the opposite
	sense. Is_Exception_Safe was missing various cases -- calls inside
	a pragma Debug, calls inside an 'if' or assignment statement,
	etc. Might_Raise now walks the entire subtree looking for things
	that can raise.
	* exp_ch9.adb (Is_Exception_Safe): Remove.
	(Build_Protected_Subprogram_Body): Replace call to
	Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
	constants where possible).
	* exp_ch7.adb: Rename Is_Protected_Body -->
	Is_Protected_Subp_Body. A protected_body is something different
	in the grammar.

2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
	* par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
	(P_Discrete_Choice_List): Initialize Expr_Node variable.
	* par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
	(P_Protected): Likewise.
	* sem_case.adb (Check_Duplicates):
	Add pragma Warnings on variable.
	* sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
	* sem_ch4.adb (List_Operand_Interps):  Add pragma Warnings on variable.
	* sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
	(Analyze_Exit_Statement): Initialize Scope_Id variable.
	(Analyze_Iterator_Specification): Initialize Bas variable.
	* sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
	Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
	(Analyze_Accept_Statement): Initialize Task_Nam.

2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb (Install_Primitive_Elaboration_Check):
	Do not generate an elaboration check if all checks have been
	suppressed.

2017-04-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications, case
	Interrupt_Handler and Attach_Handler): Generate reference
	to protected operation to prevent spurious warnings about
	unreferenced entities. Previous scheme failed with style checks
	enabled.

2017-04-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
	that follows an expression function must not be relocated to
	the generated body, because it applies to the code that follows.

From-SVN: r247387
2017-04-28 15:37:44 +02:00
Arnaud Charlet 99f8abb6af [multiple changes]
2017-04-28  Gary Dismukes  <dismukes@adacore.com>

	* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
	Relaxed_RM_Semantics to avoid having CodePeer issue errors on
	code that might violate the more stringent checking for 'Access
	introduced in Ada 2005.

2017-04-28  Arnaud Charlet  <charlet@adacore.com>

	* a-cforse.adb: minor style fix in comment.

From-SVN: r247386
2017-04-28 15:34:44 +02:00
Arnaud Charlet 1f8766d3c3 [multiple changes]
2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
	initialize Block_Decls variable.
	(Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
	(Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
	* exp_disp.adb (Expand_Interface_Actuals): Initialize
	Formal_DDT and Actual_DDT variables.
	(Expand_Interface_Thunk): Initialize Iface_Formal.
	(Make_DT): Initialize Size_Comp.
	(Make_Select_Specific_Data_Table): Initialize Decls.
	* exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
	Also initialize more RPC_Receiver_* variables.
	(Build_To_Any_Function): Initialize Cstr_Formal.
	* exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.

2017-04-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
	node between access types, freeze the designated type as well,
	so that dispatch table pointers are created in the proper scope,
	and not in the constructed body of the expression function.

2017-04-28  Bob Duff  <duff@adacore.com>

	* alloc.ads (Nodes_Initial): Go back to previous value. The large
	value makes large compilations faster, but small compilations slower.

2017-04-28  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb: minor typos in Is_Child_Or_Sibling.

2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* erroutc.adb (Compilation_Errors): Do not consider info messages
	as suitable warnings when warnings must be treated as errors.
	* sem_ch7.adb (Analyze_Package_Specification): Do not consider
	internally-generated packages when outputting completion
	information.
	* errout.adb (Output_Messages): Do not consider info messages as
	suitable warnings when warnings must be treated as errors.
	* errutil.adb (Finalize): Do not consider info messages as
	suitable warnings when warnings must be treated as errors.


2017-04-28  Eric Botcazou  <ebotcazou@adacore.com>

	* warnsw.ads: Minor fix for incorrect wording in comment.

2017-04-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (In_Instance_Code): New predicate in
	Valid_Conversion, to determine whether a type conversion appears
	as (or within) an actual for a formal object.  Type conversions
	in instances are not rechecked in Valid_Conversion because
	visibility changes between generic location andi instance may
	lead to spurious errors, but conversions within an actual must be
	fully checked, and they are not fully resolved when pre-analyzing
	the actuals.

From-SVN: r247385
2017-04-28 15:33:16 +02:00
Hristian Kirtchev d5fa5335e2 exp_ch6.adb (Expand_N_Extended_Return_Statement): Use New_Copy_Tree instead of Relocate_Node as any subsequent copies of the...
2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
	New_Copy_Tree instead of Relocate_Node as any subsequent copies
	of the relocated node will have mangled Parent pointers.
	* sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
	tables used in conjunction with entity and itype replication.
	(Visit_Entity): Rewrite the restriction on which entities
	require duplication.  The restriction now includes all types.

2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
	a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
	a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
	cleanups.

From-SVN: r247384
2017-04-28 15:29:34 +02:00
Hristian Kirtchev ef952fd5e9 exp_util.adb, [...]: Minor reformatting.
2017-04-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
	gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.

From-SVN: r247383
2017-04-28 15:26:33 +02:00