Commit Graph

182244 Commits

Author SHA1 Message Date
Piotr Trojanek a8ecf5ec32 [Ada] Refactor duplicated code for Compose, Leading_Part and Scaling
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge identical code for
	Compose, Leading_Part and Scaling attributes.
2020-12-15 06:41:49 -05:00
Jakub Jelinek 69bd5d473d i386: Fix up -march=x86-64-v[234] vs. target attribute [PR98274]
The following testcase fails to compile.  The problem is that
when ix86_option_override_internal is called the first time for command
line, it sees -mtune= wasn't present on the command line and so as fallback
sets ix86_tune_string to ix86_arch_string value ("x86-64-v2"), but
ix86_tune_specified is false, so we don't find the tuning in the table
but don't error on it.
When processing the target attribute, ix86_tune_string is what
it was earlier left with, but this time ix86_tune_specified is true and
so we error on it.

The following patch does what is done already e.g. for "x86-64" march,
in particular default the tuning to "generic".

2020-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR target/98274
	* config/i386/i386-options.c (ix86_option_override_internal): Set
	ix86_tune_string to "generic" even when it wasn't specified and
	ix86_arch_string is "x86-64-v2", "x86-64-v3" or "x86-64-v4".
	Remove useless {}s around a single statement.

	* gcc.target/i386/pr98274.c: New test.
2020-12-15 10:16:08 +01:00
Martin Liska cab1b0ebc0 lto: set nthreads_var to 1 if it is zero
gcc/ChangeLog:

	PR lto/98275
	* lto-wrapper.c: Do not use -j0 when we are unable to detect
	number of cores.
2020-12-15 10:07:37 +01:00
Jakub Jelinek 59482fa1e7 i386: Make -march=x86-64-v[234] behave more like other -march= options
If somebody has -march=x86-64-v2 (or -v3 or -v4) in $CFLAGS, $CXXFLAGS etc.,
then -m32 or -mabi=ms stops working.
What is worse, if one configures gcc --with-arch-64=x86-64-v2 (or -v3 or -v4),
then -mabi=ms stops working.

I think that is a nightmare user experience.  It is ok that x86-64-v[234]
behave slightly different from other -march= options (in that they imply
unless overridden -mtune=generic rather then -mtune= equal to the -march
argument), but the error when one mixes it with -mabi=ms, or -m32 doesn't
improve anything.
It is true that the exact option set is only defined in the x86-64 psABI
(IMHO that is a mistake too, we should copy that into the GCC documentation
like we document it for any other -march= option), but there is no reason
why that exact set of CPU features can't be used for other ABIs, it is just
a set of CPU features.  If we add micro-architecture levels to the 32-bit
ABI (I doubt anyone wants to do that, but just hypothetically), then those
micro-architecture levels wouldn't certainly be called x86-64-v* but perhaps
i386-v*.
In the tests, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 can't be expected on -m32
not because the CPU feature wouldn't be set, but because the instruction
is 64-bit only and 32-bit code doesn't have __int128 etc. support.

2020-12-15  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386-options.c (ix86_option_override_internal): Don't
	error on -march=x86-64-v[234] with -m32 or -mabi=ms.
	* config.gcc: Don't reject --with-arch=x86-64-v[234] or
	--with-arch_32=x86-64-v[234].
	* doc/invoke.texi (-march=x86-64-v[234]): Document what the option
	does for other ABIs.

	* gcc.target/i386/x86-64-v2.c: Don't expect
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 to be defined with -m32.
	* gcc.target/i386/x86-64-v2-other.c: New test.
	* gcc.target/i386/x86-64-v2-msabi.c: New test.
	* gcc.target/i386/x86-64-v3.c: Fix a comment pasto.  Don't expect
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 to be defined with -m32.
	* gcc.target/i386/x86-64-v3-other.c: New test.
	* gcc.target/i386/x86-64-v3-msabi.c: New test.
	* gcc.target/i386/x86-64-v4.c:Don't expect
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 to be defined with -m32.
	* gcc.target/i386/x86-64-v4-other.c: New test.
	* gcc.target/i386/x86-64-v4-msabi.c: New test.
2020-12-15 09:51:28 +01:00
Martin Liska efd08ad579 gcov: fix line output for nested functions in JSON format
gcc/ChangeLog:

	PR gcov-profile/98273
	* gcov.c (output_json_intermediate_file): Use stack of nested
	functions for lines in a source file.  Pop when a function ends.
2020-12-15 09:41:21 +01:00
Gerald Pfeifer 23900be4d3 libstdc++: Update link to Unicode-HOWTO
libstdc++-v3/ChangeLog:

2020-12-15  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/codecvt.xml: Update link to Unicode-HOWTO.
	* doc/html/manual/facets.html: Regenerate.
2020-12-15 09:33:18 +01:00
Gerald Pfeifer e51ef5f95f doc: Update link to KernelAddressSanitizer
gcc/ChangeLog:

2020-12-15  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/invoke.texi (Instrumentation Options): Update link to
	KernelAddressSanitizer.
2020-12-15 08:29:11 +01:00
Max Filippov 06ff8708f0 gcc: xtensa: fix PR target/98285
2020-12-14  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/predicates.md (addsubx_operand): Change accepted
	values from 2/4/8 to 1..3.
	* config/xtensa/xtensa.md (*addx, *subx): Change RTL pattern
	to use 'ashift' instead of 'mult'. Update operands[3] value.

gcc/testsuite/
	* gcc.target/xtensa/pr98285.c: New test.
2020-12-14 22:29:50 -08:00
Ian Lance Taylor 773a4106bb go-test.exp: retain any characters at end of ERROR line
* go.test/go-test.exp (errchk): Retain any characters at the end
	of the comment.
2020-12-14 20:39:53 -08:00
liuhongt e2e0c7b86f Fix up testcase.
gcc/testsuite

	* gcc.target/i386/pr78102.c: Adjust testcase.
2020-12-15 10:06:58 +08:00
GCC Administrator d52945ce54 Daily bump. 2020-12-15 00:16:35 +00:00
Gerald Pfeifer 22a9021730 rs6000: Update the processor defaults for FreeBSD
gcc/ChangeLog:

2020-12-13  Piotr Kubaj  <pkubaj@FreeBSD.org>
	    Gerald Pfeifer  <gerald@pfeifer.com>

	* config/rs6000/freebsd64.h (PROCESSOR_DEFAULT): Update
	to PROCESSOR_PPC7450.
	(PROCESSOR_DEFAULT64): Update to PROCESSOR_POWER8.
2020-12-15 00:13:42 +01:00
François Dumont 4c275e83dd libstdc++: Make tests with Undefined Behavior in C++11 UNSUPPORTED
libstdc++-v3/ChangeLog:

	* testsuite/23_containers/array/debug/back1_neg.cc: Target c++14 because assertion
	is disabled in C++11.
	* testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc: Likewise.
2020-12-14 22:28:38 +01:00
Ilya Leoshkevich 057dc81f82 aix: Fixinclude updates [PR98208]
After 92648faa1c ("aix: Fixinclude") make check-fixincludes began to
fail (at least on gcc121 machine).  Fix by updating fixincludes/tests
and rerunning genfixes.

Co-developed-by: Nathan Sidwell <nathan@acm.org>

fixincludes/ChangeLog:

2020-12-11  Ilya Leoshkevich  <iii@linux.ibm.com>

	* fixincl.x: Rerun genfixes.
	* inclhack.def(aix_physadr_t): Change test_text to something
	that needs to be replaced.
	* tests/base/sys/types.h(aix_physadr_t): Add expectation.
2020-12-14 21:57:32 +01:00
Martin Sebor fe7f75cf16 Correct/improve maybe_emit_free_warning (PR middle-end/98166, PR c++/57111, PR middle-end/98160).
Resolves:
PR middle-end/98166 - bogus -Wmismatched-dealloc on user-defined allocator and inlining
PR c++/57111 - 57111 - Generalize -Wfree-nonheap-object to delete
PR middle-end/98160 - ICE in default_tree_printer at gcc/tree-diagnostic.c:270

gcc/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* builtins.c (check_access): Call tree_inlined_location
	fndecl_alloc_p): Handle BUILT_IN_ALIGNED_ALLOC and
	BUILT_IN_GOMP_ALLOC.
	call_dealloc_p): Remove unused function.
	(new_delete_mismatch_p): Call valid_new_delete_pair_p and rework.
	(matching_alloc_calls_p): Handle built-in deallocation functions.
	(warn_dealloc_offset): Corrct the handling of user-defined operators
	delete.
	(maybe_emit_free_warning): Avoid assuming expression is a decl.
	Simplify.
	* doc/extend.texi (attribute malloc): Update.
	* tree-ssa-dce.c (valid_new_delete_pair_p): Factor code out into
	valid_new_delete_pair_p in tree.c.
	* tree.c (tree_inlined_location): Define new function.
	(valid_new_delete_pair_p): Define.
	* tree.h (tree_inlined_location): Declare.
	(valid_new_delete_pair_p): Declare.

gcc/c-family/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* c-attribs.c (maybe_add_noinline): New function.
	(handle_malloc_attribute): Call it.  Use ATTR_FLAG_INTERNAL.
	Implicitly add attribute noinline to functions not declared inline
	and warn on those.

libstdc++-v3/ChangeLog:
	* testsuite/ext/vstring/requirements/exception/basic.cc: Suppress
	a false positive warning.
	* testsuite/ext/vstring/requirements/exception/propagation_consistent.cc:
	  Same.

gcc/testsuite/ChangeLog:

	PR middle-end/98166
	PR c++/57111
	PR middle-end/98160
	* g++.dg/warn/Wmismatched-dealloc-2.C: Adjust test of expected warning.
	* g++.dg/warn/Wmismatched-new-delete.C: Same.
	* gcc.dg/Wmismatched-dealloc.c: Same.
	* c-c++-common/Wfree-nonheap-object-2.c: New test.
	* c-c++-common/Wfree-nonheap-object-3.c: New test.
	* c-c++-common/Wfree-nonheap-object.c: New test.
	* c-c++-common/Wmismatched-dealloc.c: New test.
	* g++.dg/warn/Wfree-nonheap-object-3.C: New test.
	* g++.dg/warn/Wfree-nonheap-object-4.C: New test.
	* g++.dg/warn/Wmismatched-dealloc-2.C: New test.
	* g++.dg/warn/Wmismatched-new-delete-2.C: New test.
	* g++.dg/warn/Wmismatched-new-delete.C: New test.
	* gcc.dg/Wmismatched-dealloc-2.c: New test.
	* gcc.dg/Wmismatched-dealloc-3.c: New test.
	* gcc.dg/Wmismatched-dealloc.c: New test.
2020-12-14 13:30:00 -07:00
Sebastian Pop e63ae8c083 disable --with-{cpu,arch,tune}-32
gcc/
	* config.gcc (aarch64*-*-*): Remove --with-{cpu,arch,tune}-32 flags.
2020-12-14 17:32:23 +00:00
Wilco Dijkstra 4dc486b6ba AArch64: Add support for --with-tune
Add support for --with-tune. Like --with-cpu and --with-arch, the argument is
validated and transformed into a -mtune option to be processed like any other
command-line option.  --with-tune has no effect if a -mcpu or -mtune option
is used. The validating code didn't allow --with-cpu=native, so explicitly
allow that.

Co-authored-by:  Delia Burduv  <delia.burduv@arm.com>

Bootstrap OK, regress pass, OK to commit?

2020-09-03  Wilco Dijkstra  <wdijkstr@arm.com>

gcc/
	* config.gcc (aarch64*-*-*): Add --with-tune. Support --with-cpu=native.
	* config/aarch64/aarch64.h (OPTION_DEFAULT_SPECS): Add --with-tune.

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_tune_cortex_a76): New
	effective target test.
	* gcc.target/aarch64/with-tune-config.c: New test.
	* gcc.target/aarch64/with-tune-march.c: Likewise.
	* gcc.target/aarch64/with-tune-mcpu.c: Likewise.
	* gcc.target/aarch64/with-tune-mtune.c: Likewise.
2020-12-14 17:31:46 +00:00
Martin Liska ca086b8b8b gcov: Update comments.
gcc/ChangeLog:

	* gcov.c (output_json_intermediate_file): Update comments.
2020-12-14 17:04:51 +01:00
Piotr Trojanek a21ec1de4e [Ada] Analyze second parameter of attribute Scaling
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Resolve second parameter of
	attribute Scaling just like it is resolved for a similar
	attribute Compose.
2020-12-14 10:51:56 -05:00
Piotr Trojanek 7837a887d6 [Ada] Refactor duplicated code for First and Last attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge identical code for
	First/Last, First_Bit/Last_Bit and First_Valid/Last_Valid
	attributes.
2020-12-14 10:51:55 -05:00
Piotr Trojanek 041f8c70ad [Ada] Process Truncation just like other floating point attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge similar code for
	Truncation and other floating point attributes.
2020-12-14 10:51:55 -05:00
Piotr Trojanek b27e311783 [Ada] Refactor duplicated code for floating point attributes
gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Merge identical code for
	Ceiling, Floor, Fraction, Machine, Machine_Rounding, Model,
	Rounding and Unbiased_Rounding.
2020-12-14 10:51:55 -05:00
Eric Botcazou 951d7d1319 [Ada] Small adjustments to fixed-point I/O units
gcc/ada/

	* libgnat/a-tifiio.adb: Adjust documentation.
	(OK_Get_32): Compare the object size of the base type.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	* libgnat/a-tifiio__128.adb: Adjust documentation.
	(OK_Get_32): Compare the object size of the base type.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
	* libgnat/a-wtfiio.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise
	* libgnat/a-wtfiio__128.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
	* libgnat/a-ztfiio.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise
	* libgnat/a-ztfiio__128.adb (OK_Get_32): Likewise.
	(OK_Put_32): Likewise.
	(OK_Get_64): Likewise.
	(OK_Put_64): Likewise.
	(OK_Get_128): Likewise.
	(OK_Put_128): Likewise.
2020-12-14 10:51:55 -05:00
Eric Botcazou 430dd877b8 [Ada] Small cleanup in the Ada.Text_IO hierarchy
gcc/ada/

	* libgnat/a-tifiio.adb (Get): Replace Current_Input with Current_In.
	* libgnat/a-tifiio__128.adb: (Get): Likewise.
	* libgnat/a-wtcoio.adb (Get): Likewise.
	(Put): Replace Current_Output with Current_Out.
	* libgnat/a-wtdeio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtdeio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtenio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtfiio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtfiio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtflio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtinio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtinio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtmoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-wtmoio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztcoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztdeio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztdeio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztenio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztfiio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztfiio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztflio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztinio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztinio__128.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztmoio.adb (Get): Likewise.
	(Put): Likewise.
	* libgnat/a-ztmoio__128.adb (Get): Likewise.
	(Put): Likewise.
2020-12-14 10:51:54 -05:00
Justin Squirek 7e7d99bfa2 [Ada] Incorrect accessibility level on type in formal package
gcc/ada/

	* sem_util.adb, sem_util.ads (In_Generic_Formal_Package):
	Created to identify type declarations occurring within generic
	formal packages.
	* sem_res.adb (Resolve_Allocator): Add condition to avoid
	emitting an error for allocators when the type being allocated
	is class-wide and from a generic formal package.
2020-12-14 10:51:54 -05:00
Eric Botcazou 90b2d3fafb [Ada] Fix alignment warning in System.Fat_Gen unit
gcc/ada/

	* libgnat/s-fatgen.adb (Tiny80): Add alignment clause.
2020-12-14 10:51:54 -05:00
Arnaud Charlet b934866055 [Ada] Add annotation after recent compiler changes
gcc/ada/

	* exp_util.adb (Process_Current_Value_Condition): Add assertion.
	* libgnat/s-fatgen.adb (Scaling): Add annotation.
2020-12-14 10:51:53 -05:00
Arnaud Charlet 415791cf5c [Ada] Fix compile time evaluation of shift intrinsics
gcc/ada/

	* sem_eval.adb (Fold_Shift): Compute values using the base type.
2020-12-14 10:51:53 -05:00
Eric Botcazou b97b4e6f71 [Ada] Adjust again previous change to System.Fat_Gen
gcc/ada/

	* libgnat/s-fatgen.adb: Add with clause for Interfaces and use
	type clause for Interfaces.Unsigned_64.
	(Small): Comment out.
	(Tiny): Likewise.
	(Tiny16): New integer constant.
	(Tiny32): Likewise.
	(Tiny64): Likewise.
	(Tiny80): New integer array constant.
	(Pred): Declare a local overlay for Tiny.
	(Succ): Likewise.
2020-12-14 10:51:53 -05:00
Eric Botcazou a36a291399 [Ada] Fix internal error on bit-packed array in Volatile_Full_Access record
gcc/ada/

	* exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix again packed
	array type in complex cases where array is Volatile.
	* exp_util.adb (Remove_Side_Effects): Do not force a renaming to
	be handled by the back-end.
2020-12-14 10:51:53 -05:00
Eric Botcazou 77c44637af [Ada] Adjust previous change to System.Fat_Gen
gcc/ada/

	* libgnat/s-fatgen.adb: Remove use clause for
	System.Unsigned_Types.
	(Scaling): Add renaming of System.Unsigned_Types and use type
	clause for Long_Long_Unsigned.
2020-12-14 10:51:52 -05:00
Eric Botcazou f3dd0581a5 [Ada] Implement part of System.Fat_Gen more efficiently
gcc/ada/

	* libgnat/s-fatgen.ads (Compose): Add pragma Inline.
	(Copy_Sign): Likewise.
	(Exponent): Likewise.
	(Fraction): Likewise.
	* libgnat/s-fatgen.adb: Remove with clause for System, add
	with and use clauses for System.Unsigned_Types.
	Add pragma Warnings (Off) for non-static constants.
	Remove precomputed tables of powers of radix and add a few
	constants describing the floating-point format.
	(Gradual_Scaling): Delete.
	(Copy_Sign): Reimplement directly.
	(Decompose): Likewise.
	(Scaling): Likewise.
	(Pred): Speed up.
	(Succ): Likewise.
	(Truncation): Tidy up.
	(Valid): Move constants to library level.
2020-12-14 10:51:52 -05:00
Piotr Trojanek 3cde9f1cc5 [Ada] Remove double initialization of the known value cache
gcc/ada/

	* sem_eval.adb (CV_Cache): Remove initialization at elaboration.
2020-12-14 10:51:52 -05:00
Gary Dismukes a98c6ffa0b [Ada] Fix documentation of -gnatw.K switch (activates => disables)
gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Correct documentation of the -gnatw.K switch to say that it
	disables rather than activates the warning.
	* gnat_ugn.texi: Regenerate.
2020-12-14 10:51:52 -05:00
Doug Rupp e5e963ab2e [Ada] armhf-linux: symbolic tracebacks
gcc/ada/

	* tracebak.c: Add a section for ARM Linux.
2020-12-14 10:51:51 -05:00
Ghjuvan Lacambre 9189557557 [Ada] Implement AI12-0398-1/03
gcc/ada/

	* par-ch3.adb (P_Discriminant_Part_Opt): Parse aspects, update
	documentation.
	* par-ch6.adb (P_Return_Statement): Likewise.
	* par-ch9.adb (P_Entry_Index_Specification): Likewise.
2020-12-14 10:51:51 -05:00
Gary Dismukes 097826df0c [Ada] Additional fixes for Default_Initial_Condition
gcc/ada/

	* exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Move
	generation of the call for DIC check past the optional
	generation of calls to controlled Initialize procedures.
	* exp_ch3.adb
	(Build_Array_Init_Proc.Init_One_Dimension.Possible_DIC_Call):
	Suppress generation of a DIC call when the array component type
	is controlled.  The call will now be generated later inside the
	array's DI (Deep_Initialize) procedure.
	* exp_ch7.adb
	(Make_Deep_Array_Body.Build_Initialize_Statements): Generate a
	DIC call (when needed by the array component type) after any
	call to the component type's controlled Initialize procedure, or
	generate the DIC call by itself if there's no Initialize to
	call.
	* sem_aggr.adb (Resolve_Record_Aggregate.Add_Association):
	Simplify condition to only test Is_Box_Init_By_Default (previous
	condition was overkill, as well as incorrect in some cases).
	* sem_elab.adb (Active_Scenarios.Output_Call): For
	Default_Initial_Condition, suppress call to
	Output_Verification_Call when the subprogram is a partial DIC
	procedure.
2020-12-14 10:51:51 -05:00
Eric Botcazou 3254363745 [Ada] Fix couple of bugs in the implementation of Round attribute
gcc/ada/

	* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Round>:
	Adjust commentary and set the Rounded_Result flag on the type
	conversion node when the node is needed.
	* exp_ch4.adb (Expand_N_Type_Conversion): Minor tweak.
	(Fixup_Universal_Fixed_Operation): Look through the type conversion
	only when it is to Universal_Real.
	* exp_fixd.adb: Remove with and use clauses for Snames.
	(Build_Divide): Remove redundant test.
	(Expand_Convert_Float_To_Fixed): Use Rounded_Result flag on the
	node to set the truncation parameter.
2020-12-14 10:51:50 -05:00
Piotr Trojanek c2dc9fb661 [Ada] Simplify prevention of cascaded errors for Refined_State
gcc/ada/

	* sem_prag.adb (Analyze_Refinement_Clause): Simplify recently
	added code for preventing cascaded errors.
2020-12-14 10:51:50 -05:00
Bob Duff 2c40c60ecb [Ada] Compiler crash on call to function instance
gcc/ada/

	* exp_ch6.adb (Is_Build_In_Place_Result_Type): Further narrow
	the conditions under which we enable build-in-place for
	controlled types.
2020-12-14 10:51:50 -05:00
Yannick Moy d983a9d050 [Ada] Fix warning control character for message on IN OUT parameter
gcc/ada/

	* sem_warn.adb (Output_Non_Modified_In_Out_Warnings): Use right
	warning control character 'k' in both comment and call to
	Errout_Msg_N.
2020-12-14 10:51:50 -05:00
Yannick Moy 758daef51b [Ada] Refine error messages on illegal Refined_State in SPARK
gcc/ada/

	* sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Refine the
	error message for missing Part_Of on constituent. Avoid
	cascading error.
2020-12-14 10:51:49 -05:00
Piotr Trojanek 2a1a3fc67f [Ada] Avoid reanalysis of malformed dependency relations
gcc/ada/

	* sem_prag.adb (Analyze_Depends_In_Decl_Part): Replace early
	returns with goto Leave.
	(Collect_Subprogram_Inputs_Outputs): Fix style in comment.
2020-12-14 10:51:49 -05:00
Eric Botcazou d494f9f037 [Ada] Tidy up implementation of System.Fat_Gen.Valid and inline it again
gcc/ada/

	* libgnat/s-fatgen.ads (Valid): Add again pragma Inline.
	* libgnat/s-fatgen.adb (Valid): Improve commentary, tidy up left
	and right, and remove superfluous trick for denormalized numbers.
2020-12-14 10:51:49 -05:00
Piotr Trojanek efec136240 [Ada] Fix analysis of access objects in Depends contracts
gcc/ada/

	* sem_prag.adb (Find_Role): Constant object of
	access-to-constant and access-to-subprogram types are not
	writable.
	(Collect_Subprogram_Inputs_Outputs): In-parameters of
	access-to-variable type can act as outputs of the Depends
	contracts.
2020-12-14 10:51:49 -05:00
Piotr Trojanek ae8c56262d [Ada] Update comment for processing of pragma Assertion_Policy
gcc/ada/

	* sa_messages.ads: Reference Subprogram_Variant in the comment
	for Assertion_Check.
	* sem_prag.adb (Analyze_Pragma): Add Subprogram_Variant as an
	ID_ASSERTION_KIND; move Default_Initial_Condition as an
	RM_ASSERTION_KIND.
2020-12-14 10:51:48 -05:00
Yannick Moy 3fcb8100aa [Ada] Correctly mark subprogram as not always inlined in GNATprove mode
gcc/ada/

	* inline.adb (Cannot_Inline): Add No_Info parameter to disable
	info message.
	* inline.ads (Cannot_Inline): When No_Info is set to True, do
	not issue info message in GNATprove mode, but still mark the
	subprogram as not always inlined.
	* sem_res.adb (Resolve_Call): Always call Cannot_Inline inside
	an assertion expression.
2020-12-14 10:51:48 -05:00
Eric Botcazou 49ea96b4d8 [Ada] Adjust documentation of System.Img_Util.Set_Decimal_Digits
gcc/ada/

	* libgnat/s-imguti.ads (Set_Decimal_Digits): Adjust documentation.
2020-12-14 10:51:48 -05:00
Nathan Sidwell 62c5ea5228 preprocessor: Deferred macro support
For deferred macros we also need a new field on the macro itself, so
that the module machinery can determine the macro was imported.  Also
the documentation for the hashnode's deferred field was incomplete.

	libcpp/
	* include/cpplib.h (struct cpp_macro): Add imported_p field.
	(struct cpp_hashnode): Tweak deferred field documentation.
	* macro.c (_cpp_new_macro): Clear new field.
	(cpp_get_deferred_macro, get_deferred_or_lazy_macro): Assert
	more.
2020-12-14 07:23:59 -08:00
Tamar Christina 159b0bd9ce middle-end: Exclude TOP permute from blend considerations
Similarly to UNKNOWN permutes, TOP needs to be excluded from being considered
for blends because it produces no permute to check.

gcc/ChangeLog:

	PR middle-end/98264
	* tree-vect-slp-patterns.c (linear_loads_p): Exclude TOP permute.

gcc/testsuite/ChangeLog:

	PR middle-end/98264
	* gcc.target/i386/pr98264.c: New test.
2020-12-14 15:20:11 +00:00