Commit Graph

188216 Commits

Author SHA1 Message Date
Aldy Hernandez
08f392534a Allocate non_null_ref tables at creation.
Preallocating the space is slightly cheaper than calling
safe_grow_cleared.

gcc/ChangeLog:

	* gimple-range-cache.cc (non_null_ref::non_null_ref): Use create
	and quick_grow_cleared instead of safe_grow_cleared.
2021-09-21 18:55:13 +02:00
Doug Rupp
303b5d8747 [Ada] Add some comments in init.c about the lynx178 signal handler
gcc/ada/

	* init.c (__gnat_error_handler) [LynxOS]: Add a comment about
	missing optional args.
2021-09-21 15:25:04 +00:00
Yannick Moy
e839168738 [Ada] Rename "optional" node subtypes that allow Empty
gcc/ada/

	* gen_il-gen.adb (Put_Opt_Subtype): Add suffix.
2021-09-21 15:25:03 +00:00
Justin Squirek
7d9735bbb8 [Ada] Spurious dynamic accessibility check on allocator
gcc/ada/

	* sem_util.adb (Accessibility_Level): Remove spurious special
	case for protected type components.
	* exp_ch4.adb (Generate_Accessibility_Check): Use general
	Accessibility_Level instead of the low-level function
	Type_Access_Level.
2021-09-21 15:25:03 +00:00
Eric Botcazou
f6ccb788f2 [Ada] Regenerate gnat_ugn.texi
gcc/ada/

	* gnat_ugn.texi: Regenerate.
2021-09-21 15:25:03 +00:00
Matthieu Eyraud
57fb9d3820 [Ada] SCOs: generate 'P' decisions for [Type_]Invariant pragmas
gcc/ada/

	* par_sco.adb (Traverse_One): Add support for pragma Invariant /
	Type_Invariant.
2021-09-21 15:25:02 +00:00
Bob Duff
bd413702ce [Ada] Add "optional" node subtypes that allow Empty
gcc/ada/

	* gen_il-gen.adb (Put_Opt_Subtype): Print out subtypes of the
	form:
	subtype Opt_N_Declaration is
	Node_Id with Predicate =>
	Opt_N_Declaration = Empty or else
	Opt_N_Declaration in N_Declaration_Id;
	One for each node or entity type, with the predicate allowing
	Empty.
	* atree.adb (Parent, Set_Parent): Remove unnecessary "Atree.".
2021-09-21 15:25:02 +00:00
Patrick Bernardi
0df911d905 [Ada] bindgen: support additional features on targets suppressing the standard lib
gcc/ada/

	* bindgen.adb (Gen_Adainit): For targets that suppress the
	standard library: set the default stack size global variable if
	a value is provided via the -d switch, and generate a call to
	__gnat_initialize_stack_limit if stack checking using stack
	limits is enabled.
2021-09-21 15:25:02 +00:00
Bob Duff
618fff6043 [Ada] Fix regression in ACATS bdd2006 and bdd2007
gcc/ada/

	* sem_ch13.adb (Stream_Size): Print message about allowed stream
	sizes even if other error were already found. This avoids
	falling into the 'else', which prints "Stream_Size cannot be
	given for...", which is misleading -- the Size COULD be given if
	it were correct.
2021-09-21 15:25:01 +00:00
Daniel Mercier
900f9d999c [Ada] Set related expression for external DISCR symbols in Build_Temporary
gcc/ada/

	* exp_util.adb (Build_Temporary): In case of an external DISCR
	symbol, set the related expression for CodePeer so that a more
	comprehensible message can be emitted to the user.
2021-09-21 15:25:01 +00:00
Eric Botcazou
13b594411d [Ada] Minor tweaks to System.Dwarf_Line
gcc/ada/

	* libgnat/s-dwalin.adb (Parse_Header): Tweak comments.
	(Read_Entry_Format_Array): Tweak exception message.
	(Symbolic_Address.Set_Result): Likewise.
2021-09-21 15:25:01 +00:00
Ed Schonberg
dbea36c6bd [Ada] Crash on build of Initialization procedure for derived container
gcc/ada/

	* exp_ch7.adb (Make_Init_Call): Add guard to protect against a
	missing initialization procedure for a type.
2021-09-21 15:25:01 +00:00
Doug Rupp
1d8617eb8c [Ada] Cleanup old VxWorks in Makefile.rtl
gcc/ada/

	* Makefile.rtl: Remove unused VxWorks sections.
	* libgnarl/s-vxwext__noints.adb: Remove.
	* libgnarl/s-vxwext__vthreads.ads: Remove.
	* libgnat/a-elchha__vxworks-ppc-full.adb: Remove.
	* libgnat/s-osprim__vxworks.adb: Remove.
	* libgnat/s-osvers__vxworks-653.ads: Remove.
	* libgnat/system-vxworks-e500-vthread.ads: Remove.
	* libgnat/system-vxworks-ppc-vthread.ads: Remove.
	* libgnat/system-vxworks-x86-vthread.ads: Remove.
2021-09-21 15:25:00 +00:00
Bob Duff
b6bb60b241 [Ada] Add assertions to Uintp (UI_Is_In_Int_Range)
gcc/ada/

	* uintp.ads, uintp.adb (UI_Is_In_Int_Range): Change the type of
	the formal parameter to Valid_Uint. Remove code that preserved
	the previous behavior, and replace it with an assertion. The
	previous behavior is no longer needed given the recent change to
	gigi.
	(No, Present): Add comment.
2021-09-21 15:25:00 +00:00
Bob Duff
911b00fba9 [Ada] Remove if_expression
gcc/ada/

	* sem_eval.adb (Fold_Shift): Replace an if_expression with an
	if_statement.
2021-09-21 15:25:00 +00:00
Bob Duff
b12d18a825 [Ada] Add assertions to Uintp
gcc/ada/

	* uintp.ads, uintp.adb: Add assertions.
	(Ubool, Opt_Ubool): New "boolean" subtypes.
	(UI_Is_In_Int_Range): The parameter should probably be
	Valid_Uint, but we don't change that for now, because it causes
	failures in gigi.
	* sem_util.ads, sem_util.adb (Is_True, Is_False,
	Static_Boolean): Use Opt_Ubool subtype.  Document the fact that
	Is_True (No_Uint) = True.  Implement Is_False in terms of
	Is_True.  We considered changing Static_Boolean to return Uint_1
	in case of error, but that doesn't fit in well with
	Static_Integer.
	(Has_Compatible_Alignment_Internal): Deal with cases where Offs
	is No_Uint. Change one "and" to "and then" to ensure we don't
	pass No_Uint to ">", which would violate the new assertions.
	* exp_util.adb, freeze.adb, sem_ch13.adb: Avoid violating new
	assertions in Uintp.
2021-09-21 15:24:59 +00:00
Eric Botcazou
97a5ed2071 [Ada] Small optimization to DWARF 5 mode in System.Dwarf_Line
gcc/ada/

	* libgnat/s-dwalin.adb (To_File_Name): Fetch only the last string
	from the .debug_line_str section.
	(Symbolic_Address.Set_Result): Likewise.
2021-09-21 15:24:59 +00:00
Eric Botcazou
97c5d522c6 [Ada] Follow-up tweaks to System.Dwarf_Line
gcc/ada/

	* libgnat/s-dwalin.adb (Skip_Form): Fix cases of DW_FORM_addrx
	and DW_FORM_implicit_const.  Replace Constraint_Error with
	Dwarf_Error.
2021-09-21 15:24:59 +00:00
Ghjuvan Lacambre
cf7aa7d8e8 [Ada] exp_pakd.adb: work around spurious Codepeer warnings
gcc/ada/

	* exp_pakd.adb (Expand_Packed_Not): Replace expression with
	statement.
2021-09-21 15:24:58 +00:00
Ghjuvan Lacambre
69a0ff3416 [Ada] Fix ignored dynamic predicates specified through "predicate" aspect
gcc/ada/

	* sem_eval.adb (Is_Static_Subtype): Take predicates created
	through "predicate" pragma into account.
2021-09-21 15:24:58 +00:00
Frederic Konrad
566b479011 [Ada] rtems: add 128bit support for aarch64
gcc/ada/

	* Makefile.rtl (aarch64-rtems*): Add GNATRTL_128BIT_PAIRS to
	the LIBGNAT_TARGET_PAIRS list and also GNATRTL_128BIT_OBJS to
	the EXTRA_GNATRTL_NONTASKING_OBJS list.
2021-09-21 15:24:58 +00:00
Gary Dismukes
704d03a4e3 [Ada] Presence of abstract operator function causes resolution problems
gcc/ada/

	* sem_ch4.adb (Remove_Abstract_Operations): Add condition to
	test for an E_Operator as part of criteria for setting
	Abstract_Op on interpretations involving predefined operators.
2021-09-21 15:24:57 +00:00
Javier Miranda
16e307b9a4 [Ada] Interface behaves differently from abstract tagged null
gcc/ada/

	* exp_ch6.adb (Expand_Simple_Function_Return): For explicit
	dereference of type conversion, enable code that ensures that
	the tag of the result is that of the result type.
2021-09-21 15:24:57 +00:00
Bob Duff
b23cdc0158 [Ada] Clean up uses of Esize and RM_Size
gcc/ada/

	* einfo-utils.adb: Add support (currently disabled) for using
	"initial zero" instead of "Uint_0" to represent "unknown".  Call
	Known_ functions, instead of evilly duplicating their code
	inline.
	* fe.h (No_Uint_To_0): New function to convert No_Uint to
	Uint_0, in order to preserve existing behavior.
	(Copy_Esize, Copy_RM_Size): New imports from Einfo.Utils.
	* cstand.adb: Set size fields of Standard_Debug_Renaming_Type
	and Standard_Exception_Type.
	* checks.adb, exp_attr.adb, exp_ch3.adb, exp_ch5.adb,
	exp_ch6.adb, exp_pakd.adb, exp_util.adb, freeze.adb, itypes.adb,
	layout.adb, repinfo.adb, sem_attr.adb, sem_ch12.adb,
	sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch7.adb,
	sem_util.adb: Protect calls with Known_..., use Copy_...  Remove
	assumption that Uint_0 represents "unknown".
	* types.ads (Nonzero_Int): New subtype.
	* gcc-interface/decl.c, gcc-interface/trans.c: Protect calls
	with Known_... and use Copy_...  as appropriate, to avoid
	blowing up in unknown cases. Similarly, call No_Uint_To_0 to
	preserve existing behavior.
2021-09-21 15:24:57 +00:00
Steve Baird
e906896787 [Ada] Enforce legality rule for Predicate_Failure aspect specifications
gcc/ada/

	* sem_ch13.adb (Analyze_Aspect_Specifications): Add a new nested
	function, Directly_Specified, and then use it in the
	implementation of the required check.
2021-09-21 15:24:56 +00:00
Steve Baird
3598c8db40 [Ada] Refactor sort procedures of doubly linked list containers
gcc/ada/

	* libgnat/a-costso.ads, libgnat/a-costso.adb: A new library
	unit, Ada.Containers.Stable_Sorting, which exports a pair of
	generics (one within the other) which are instantiated by each
	of the 5 doubly-linked list container generics to implement
	their respective Sort procedures. We use a pair of generics,
	rather than a single generic, in order to further reduce code
	duplication. The outer generic takes a formal private Node_Ref
	type representing a reference to a linked list element. For some
	instances, the corresponding actual parameter will be an access
	type; for others, it will be the index type for an array.
	* Makefile.rtl: Include new Ada.Containers.Stable_Sorting unit.
	* libgnat/a-cbdlli.adb, libgnat/a-cdlili.adb,
	libgnat/a-cfdlli.adb, libgnat/a-cidlli.adb, libgnat/a-crdlli.adb
	(Sort): Replace existing Sort implementation with a call to an
	instance of
	Ada.Containers.Stable_Sorting.Doubly_Linked_List_Sort. Declare
	the (trivial) actual parameters needed to declare that instance.
	* libgnat/a-cfdlli.ads: Fix a bug encountered during testing in
	the postcondition for M_Elements_Sorted. With a partial
	ordering, it is possible for all three of (X < Y), (Y < X),
	and (X = Y) to be simultaneously false, so that case needs to
	handled correctly.
2021-09-21 15:24:56 +00:00
Piotr Trojanek
2528d0c7ce [Ada] Update comment for Error_Msg_Internal
gcc/ada/

	* errout.adb (Error_Msg_Internal): Fix references to Sptr and
	Optr in comment; fix grammar of "low-level" where it is used as
	an adjective.
2021-09-21 15:24:55 +00:00
Piotr Trojanek
255279b91e [Ada] Simplify iteration when printing error message spans
gcc/ada/

	* errout.adb (Write_Source_Code_Lines): Use Cur_Loc before
	incrementing it, so that we don't need to decrement it.
2021-09-21 15:24:55 +00:00
Yannick Moy
ea3789f6a2 [Ada] Exception raised on empty file in GNATprove mode
gcc/ada/

	* errout.adb (Get_Line_End): Do not allow the result to go past
	the end of the buffer.
2021-09-21 15:24:55 +00:00
Ed Schonberg
c36332031c [Ada] Refine patch for spurious link error involving discriminated types
gcc/ada/

	* sem_ch3.adb (Process_Discriminant_Expressions): If the
	constraint is for a Component_Definition that appears in a
	Component_Declaration, the entity to be used to create the
	potentially global symbol is the Defining_Identifier of the
	Component_Declaration.
2021-09-21 15:24:55 +00:00
Bob Duff
4d027eea55 [Ada] Remove "with GNAT.OS_Lib;" from libgnat/a-stbufi.ads
gcc/ada/

	* libgnat/a-stbufi.ads, libgnat/a-stbufi.adb: Change all
	occurrences of GNAT.OS_Lib to System.OS_Lib.
2021-09-21 15:24:54 +00:00
Thomas Schwinge
e87789f197 Evaluate 'random ()' to '0' in 'pass_omp_oacc_neuter_broadcast'
Julian Brown,
<http://mid.mail-archive.com/20210920134603.16459021@squid.athome>:

| [...] the randomness shouldn't be necessary for the
| correctness of the patch (i.e. it could just be "base = bounds_lo", or
| indeed folded into the line after).
|
| The "ar.invalid ()" case happens when we fail to allocate a block of
| memory in LDS space for broadcasting a particular set of variables,
| and trigger a fall-back path in the broadcasting code that adds extra
| barriers around the broadcast in question. I imagine I was thinking
| that adding randomness could mean we can "get lucky" sometimes and
| avoid needing those barriers in some cases, but in fact I don't think
| that was implemented, so the randomness is useless. (Or it could just
| have been leftover debug code... oops).

	gcc/
	PR other/102408
	* omp-oacc-neuter-broadcast.cc (oacc_do_neutering): Evaluate
	'random ()' to '0'.
2021-09-21 12:38:44 +02:00
Richard Earnshaw
4e7a92c0ff arm: pass architecture extensions to assembler if supported
When I originally added the new extended architecture features support
to GCC, the assembler was unable to parse the new feature lists on the
command-line and would throw an error.  This has now been fixed in GAS
and the behaviour is the same as GCC.

So this patch adds a configure-time test for the assembler in use to
detect that it is recent enough to support this behaviour and then
enables passing the architecture extensions to the assembler when this
is the case.

Although the assembly output generated by GCC does not rely on this,
this should ease some issues when using GCC as a driver for compiling
source written directly in assembly language when the programmer was
expecting the appropriate options to be passed on the command line.

gcc/ChangeLog:

	* configure.ac: Detect when the assembler supports new-style
	architecture extensions.
	* common/config/arm/arm-common.c (arm_rewrite_mcpu): Return
	the full CPU string if the assembler can grok it.
	(arm_rewrite_march): Likewise but for the architecture.
	* config.in: Regenerate.
	* configure: Regenerate.
2021-09-21 11:20:37 +01:00
Richard Biener
55b989de76 tree-optimization/102421 - copy alignment info when splitting groups
This makes sure to copy and adjust alignment info when we are splitting
DR groups after alignment analysis.

2021-09-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/102421
	* tree-vect-loop.c (vect_dissolve_slp_only_groups): Copy and
	adjust alignment info.

	* g++.dg/vect/pr102421.cc: New testcase.
2021-09-21 10:39:33 +02:00
Eric Botcazou
6e6bf4cd21 Fix no_fsanitize_address effective target
The implementation of the no_fsanitize_address effective target was copied
from asan-dg.exp without realizing that it does not work outside of this
context (there is a comment explaining why).  As a consequence, it always
returns 0, so for example the directive in gnat.dg/asan1.adb:

{ dg-skip-if "no address sanitizer" { no_fsanitize_address } }

does not work.  This led some people to add the nonsensical:

{ dg-require-effective-target no_fsanitize_address }

to sanitizer tests, e.g. g++.dg/warn/uninit-pr93100.C, thus disabling them
everywhere instead of just for the problematic targets.

gcc/testsuite/
	* lib/target-supports.exp (no_fsanitize_address): Add missing bits.
	* gcc.dg/uninit-pr93100.c: Skip if no_fsanitize_address.
	* gcc.dg/pr91441.c: Likewise.
	* gcc.dg/pr96260.c: Likewise.
	* gcc.dg/pr96307.c: Likewise.
	* g++.dg/warn/uninit-pr93100.C: Likewise.
	* gnat.dg/asan1.adb: Likewise.

	* gcc.dg/Wstringop-overflow-70.c: Adjust for SPARC.
	* g++.dg/abi/anon4.C: Likewise.
2021-09-21 09:29:39 +02:00
Tobias Burnus
417ea5c02c Fortran: Fix -Wno-missing-include-dirs handling [PR55534]
gcc/fortran/ChangeLog:

	PR fortran/55534
	* cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make
	cpp_reason_option_codes available.
	(gfc_cpp_register_include_paths): Make static, set pfile's
	warn_missing_include_dirs and move before caller.
	(gfc_cpp_init_cb): New, cb code moved from ...
	(gfc_cpp_init_0): ... here.
	(gfc_cpp_post_options): Call gfc_cpp_init_cb.
	(cb_cpp_diagnostic_cpp_option): New. As implemented in c-family
	to match CppReason flags to -W... names.
	(cb_cpp_diagnostic): Use it to replace single special case.
	* cpp.h (gfc_cpp_register_include_paths): Remove as now static.
	* gfortran.h (gfc_check_include_dirs): New prototype.
	(gfc_add_include_path): Add new bool arg.
	* options.c (gfc_init_options): Don't set -Wmissing-include-dirs.
	(gfc_post_options): Set it here after commandline processing. Call
	gfc_add_include_path with defer_warn=false.
	(gfc_handle_option): Call it with defer_warn=true.
	* scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs,
	gfc_check_include_dirs): New. Diagnostic moved from ...
	(add_path_to_list): ... here, which came before cmdline processing.
	Take additional bool defer_warn argument.
	(gfc_add_include_path): Take additional defer_warn arg.
	* scanner.h (struct gfc_directorylist): Reorder for alignment issues,
	add new 'bool warn'.

libgfortran/ChangeLog:
	PR fortran/55534
	* configure.ac (AM_FCFLAGS): Add -Wno-missing-include-dirs.
	* configure: Regenerate.

libgomp/ChangeLog:
	PR fortran/55534
	* testsuite/libgomp.fortran/fortran.exp: Add -Wno-missing-include-dirs
	to ALWAYS_CFLAGS.
	* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.

gcc/testsuite/ChangeLog:
	* gfortran.dg/include_6.f90: Change dg-error to
	dg-warning and update pattern.
	* gfortran.dg/include_14.f90: New test.
	* gfortran.dg/include_15.f90: New test.
	* gfortran.dg/include_16.f90: New test.
	* gfortran.dg/include_17.f90: New test.
	* gfortran.dg/include_18.f90: New test.
	* gfortran.dg/include_19.f90: New test.
	* gfortran.dg/include_20.f90: New test.
	* gfortran.dg/include_21.f90: New test.
2021-09-21 08:28:30 +02:00
Kewen Lin
63c6446f77 ipa-fnsummary: Remove inconsistent bp_pack_value
There is one inconsistent bit-field streaming out and in.
On the side of streaming in:

    bp_pack_value (&bp, info->inlinable, 1);
    bp_pack_value (&bp, false, 1);
    bp_pack_value (&bp, info->fp_expressions, 1);

while on the side of the streaming out:

    info->inlinable = bp_unpack_value (&bp, 1);
    info->fp_expressions = bp_unpack_value (&bp, 1)

The removal of Cilk Plus support r8-4956 missed to remove
the streaming out of the bit, instead just change the value
for streaming out to be always false.

By hacking fp_expression_p to always return true, I can see
it reads the wrong fp_expressions value (false) out in wpa.

gcc/ChangeLog:

	* ipa-fnsummary.c (ipa_fn_summary_write): Remove inconsistent
	bitfield stream out.
2021-09-20 21:00:04 -05:00
wangpc
56c24f18cc C++: add type checking for static local vector variable in template
This patch moves verify_type_context from start_decl_1 to cp_finish_decl to
do more type checking such as static local vector variable in C++ template.

2021-08-06  wangpc  <pc.wang@linux.alibaba.com>

gcc/cp/ChangeLog

	* decl.c (start_decl_1): Move verify_type_context to ...
	(cp_finish_decl): ... to here.

gcc/testsuite/ChangeLog

	* g++.target/aarch64/sve/static-var-in-template.C: New test.
2021-09-20 20:52:46 -04:00
GCC Administrator
624980241e Daily bump. 2021-09-21 00:16:31 +00:00
Andrew MacLeod
73cf73af23 Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.
If an incoming edge is UNDEFINED, don't process it.  Track if other edges
equate to a single value, and add an equivalence if appropriate.

	gcc/
	* gimple-range-fold.cc (fold_using_range::range_of_phi): Ignore
	undefined edges, apply an equivalence if appropriate.
	* gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Return
	UNDEFINED if EDGE_EXECUTABLE is not set.
	* gimple-range.cc (gimple_ranger::gimple_ranger): Set all edges
	as EXECUTABLE upon startup.
	(gimple_ranger::range_on_edge): Return UNDEFINED for edges without
	EDGE_EXECUTABLE set.
	* vr-values.c (set_and_propagate_unexecutable): New.
	(simplify_using_ranges::fold_cond): Call set_and_propagate.
	(simplify_using_ranges::simplify_switch_using_ranges): Ditto.
	* vr-values.h: Add prototype.

	gcc/testsuite/
	* gcc.dg/tree-ssa/evrp-ignore.c: New.
2021-09-20 16:32:35 -04:00
Andrew MacLeod
5d110fe90a Make each def a new equivalency record.
Create a new equivalency set at each def point killing any equivalencies
coming into the block from back edges.  Do not add equivalences for PHI
arguments defined in this block.

	* value-relation.cc (equiv_oracle::register_initial_def): New.
	(equiv_oracle::register_relation): Call register_initial_def.
	(equiv_oracle::add_equiv_to_block): New.  Split register_relation.
	(relation_oracle::register_stmt): Check def block of PHI arguments.
	* value-relation.h (equiv_oracle): Add new prototypes.
2021-09-20 16:32:35 -04:00
Harald Anlauf
b333c3acb8 MAINTAINERS: add myself as Fortran reviewer
ChangeLog:

	* MAINTAINERS (Reviewers): Add myself as Fortran reviewer.
2021-09-20 22:16:18 +02:00
Matthias Kretz
1949d7540a c-family: Add more predefined macros for math flags
Library code, especially in headers, sometimes needs to know how the
compiler interprets / optimizes floating-point types and operations.
This information can be used for additional optimizations or for
ensuring correctness. This change makes -freciprocal-math,
-fno-signed-zeros, -fno-trapping-math, -fassociative-math, and
-frounding-math report their state via corresponding pre-defined macros.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

gcc/testsuite/ChangeLog:

	* gcc.dg/associative-math-1.c: New test.
	* gcc.dg/associative-math-2.c: New test.
	* gcc.dg/no-signed-zeros-1.c: New test.
	* gcc.dg/no-signed-zeros-2.c: New test.
	* gcc.dg/no-trapping-math-1.c: New test.
	* gcc.dg/no-trapping-math-2.c: New test.
	* gcc.dg/reciprocal-math-1.c: New test.
	* gcc.dg/reciprocal-math-2.c: New test.
	* gcc.dg/rounding-math-1.c: New test.
	* gcc.dg/rounding-math-2.c: New test.

gcc/c-family/ChangeLog:

	* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
	undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
	__NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
	__ROUNDING_MATH__ according to the new optimization flags.

gcc/ChangeLog:

	* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
	Define __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
	__NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
	__ROUNDING_MATH__ according to their corresponding flags.
	* doc/cpp.texi: Document __RECIPROCAL_MATH__,
	__NO_SIGNED_ZEROS__, __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__,
	and __ROUNDING_MATH__.
2021-09-20 15:13:11 +02:00
Piotr Trojanek
71a4bdada5 [Ada] Remove redundant checks for non-empty list of aspects
gcc/ada/

	* inline.adb (Has_Excluded_Declaration): Remove redundant guard;
	the guarded code will call First on a No_List, which is
	well-defined and gives Empty.
2021-09-20 12:31:38 +00:00
Piotr Trojanek
3613473ab1 [Ada] Fix shadowing in conditions for inlining
gcc/ada/

	* inline.adb (Has_Excluded_Declaration): Rename and reduce scope
	of a local variable.
2021-09-20 12:31:37 +00:00
Bob Duff
2175b50b74 [Ada] Present and No functions for type Uint
gcc/ada/

	* uintp.ads, uintp.adb (Present, No): New functions for
	comparing with No_Uint.
	* checks.adb, einfo-utils.adb, exp_aggr.adb, exp_attr.adb,
	exp_ch3.adb, exp_ch4.adb, exp_dbug.adb, exp_disp.adb,
	exp_util.adb, repinfo.adb, repinfo-input.adb, scn.adb,
	sem_attr.adb, sem_ch13.adb, sem_eval.adb, sem_util.adb,
	sinfo-utils.adb, treepr.adb: Use Present (...) instead of "...
	/= No_Uint", and No (...) instead of "... = No_Uint".
2021-09-20 12:31:37 +00:00
Claire Dross
9613900aef [Ada] Add SPARK_Mode => Off to System.File_Control_Block
gcc/ada/

	* libgnat/s-ficobl.ads: The entire package has a SPARK_Mode =>
	Off aspect.
2021-09-20 12:31:36 +00:00
Doug Rupp
c5049dfec7 [Ada] Use OS_Time for interface to TZ functions.
gcc/ada/

	* libgnat/a-calend.adb: Remove time_t, replace with OS_Time.
	* libgnat/s-os_lib.ads: Fix comments regarding time_t conversion
	functions to reflect the use of To_Ada in in Ada.Calendar
	package body.
	* sysdep.c (__gnat_localtime_tzoff): Use OS_Time instead of
	time_t.
2021-09-20 12:31:36 +00:00
Piotr Trojanek
a06c060b15 [Ada] Accept volatile expressions as non-scalar actual parameters
gcc/ada/

	* sem_res.adb (Resolve_Actual): Remove
2021-09-20 12:31:36 +00:00
Bob Duff
8e5a883263 [Ada] Clean up Uint fields, remove unused routines
gcc/ada/

	* einfo-utils.ads, einfo-utils.adb, fe.h, einfo.ads,
	gen_il-fields.ads: Remove unused and no-longer-used routines.
	Move related routines together.  Rewrite incorrect
	documentation, and documentation that will be incorrect when
	e.g. Esize-related routines are fixed.  Remove unused field
	Normalized_Position_Max.
	* cstand.adb, exp_pakd.adb, freeze.adb,
	gen_il-gen-gen_entities.adb, itypes.adb, layout.adb,
	sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb,
	sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_prag.adb,
	sem_util.adb, ttypes.ads: Update calls to routines removed from
	or renamed in Einfo.Utils.
	* uintp.ads (Upos): Fix this subtype, which was unintentionally
	declared to include Uint_0.
2021-09-20 12:31:35 +00:00