aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2024-03-08Daily bump.GCC Administrator1-0/+6
2024-03-07Fix bogus error on allocator for array type with Dynamic_PredicateEric Botcazou1-2/+4
This is a regression present on all active branches: the compiler gives a bogus error on an allocator for an unconstrained array type declared with a Dynamic_Predicate because Apply_Predicate_Check is invoked directly on a subtype reference, which it cannot handle. This moves the check to the resulting access value (after dereference) like in Expand_Allocator_Expression. gcc/ada/ PR ada/113979 * exp_ch4.adb (Expand_N_Allocator): In the subtype indication case, call Apply_Predicate_Check on the resulting access value if needed. gcc/testsuite/ * gnat.dg/predicate15.adb: New test.
2024-02-27Daily bump.GCC Administrator1-0/+12
2024-02-26Finalization of object allocated by anonymous access designating local typeEric Botcazou3-12/+30
The finalization of objects dynamically allocated through an anonymous access type is deferred to the enclosing library unit in the current implementation and a warning is given on each of them. However this cannot be done if the designated type is local, because this would generate dangling references to the local finalization routine, so the finalization needs to be dropped in this case and the warning adjusted. gcc/ada/ PR ada/113893 * exp_ch7.adb (Build_Anonymous_Master): Do not build the master for a local designated type. * exp_util.adb (Build_Allocate_Deallocate_Proc): Force Needs_Fin to false if no finalization master is attached to an access type and assert that it is anonymous in this case. * sem_res.adb (Resolve_Allocator): Mention that the object might not be finalized at all in the warning given when the type is an anonymous access-to-controlled type. gcc/testsuite/ * gnat.dg/access10.adb: New test.
2024-01-24Daily bump.GCC Administrator1-0/+4
2024-01-23Update year in GnatvsnRonan Desplanques1-1/+1
gcc/ada/ * gnatvsn.ads: Update year.
2024-01-22Update copyright years.Marc Poulhiès2236-2236/+2236
2024-01-10Daily bump.GCC Administrator1-0/+201
2024-01-09ada: Fix bogus Constraint_Error on allocator for access to array of access typeEric Botcazou2-4/+5
This occurs because the access element type is not its own TYPE_CANONICAL, which creates a discrepancy between the aliasing support code, which deals with types directly, and the middle-end which looks at TYPE_CANONICAL only. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: Use the TYPE_CANONICAL of types when it comes to aliasing. * gcc-interface/utils.cc (relate_alias_sets): Likewise.
2024-01-09ada: Preliminary cleanup in aliasing support codeEric Botcazou3-41/+38
This declares an explicit temporary for the fields of the fat pointer type in gnat_to_gnu_entity and removes the GNU_ prefix of the parameters of the relate_alias_sets routine for the sake of brevity. No functional changes. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: Use a separate FLD local variable to hold the first field of the fat pointer type being built. * gcc-interface/gigi.h (relate_alias_sets): Remove GNU_ prefix on the first two parameters. * gcc-interface/utils.cc (relate_alias_sets): Likewise and adjust.
2024-01-09ada: Do not count comparison of addresses as a modificationViljar Indus1-2/+6
In some extended code we generate comparisons between the Addresses of some variables. This causes those variables to be considered modified. Whereas in this particular scenario the variables are just referenced. gcc/ada/ * sem_attr.adb: avoid marking a use of the Address attribute as a modification of its prefix.
2024-01-09ada: Minor change replacing "not Present" tests with "No" testsGary Dismukes1-2/+2
Fixing two places flagged by gnatcheck to use "No" instead of "not Present". gcc/ada/ * exp_aggr.adb (Expand_Container_Aggregate): Change "not Present" tests to tests using "No" (in two places).
2024-01-09ada: Allow passing private types to generic formal incomplete typesBob Duff1-80/+76
It is legal to pass a private type, or a type with a component whose type is private, as a generic actual type if the formal is a generic formal incomplete type. This patch fixes a bug in which the compiler would give an error in some such cases. Also misc cleanup. gcc/ada/ * sem_ch12.adb (Instantiate_Type): Make the relevant error message conditional upon "Ekind (A_Gen_T) /= E_Incomplete_Type". Misc cleanup.
2024-01-09ada: Excess elements created for indexed aggregates with iterator_specificationsGary Dismukes1-74/+77
In the case of an indexed aggregate of a container type with both Add_Unnamed and New_Indexed specified in the Aggregate aspect of the type (such as for the Vector type in Ada.Containers.Vectors), in cases where a component association is given by an iterator_specification, the compiler could end up generating a call to the New_Indexed operation rather than the Empty operation. For example, in the case of a Vector type, this could result in allocating a container of the size of the defaulted Capacity formal of the New_Vector function (with uninitialized components), and elements added in the aggregate would append to that preallocated Vector. The compiler is corrected so that the Empty function is called to initialize the implicit aggregate object, rather than the New_Indexed function. gcc/ada/ * exp_aggr.adb (Expand_Container_Aggregate): Add code to determine whether the aggregate is an indexed aggregate, setting a flag (Is_Indexed_Aggregate), which is tested to have proper separation of treatment for the Add_Unnamed (for positional aggregates) and New_Indexed (for indexed aggregates) cases. In the code generating associations for indexed aggregates, remove the code for Expressions cases entirely, since the code for indexed aggregates is governed by the presence of Component_Associations, and add an assertion that Expressions must be Empty. Also, exclude empty aggregates from entering that code.
2024-01-09ada: Remove unused runtime entityEric Botcazou3-20/+0
The compiler has not generated direct attachments for a long time. gcc/ada/ * rtsfind.ads (RE_Id): Remove RE_Attach. (RE_Unit_Table): Likewise. * libgnat/s-finmas.ads (Attach): Delete. * libgnat/s-finmas.adb (Attach): Likewise.
2024-01-09ada: Fix limited_with in Check_Scil; allow for <> in pp of aggregateTucker Taft2-1/+6
Check_Scil failed due to not handling a type that came from a package that was mentioned in a limited-with clause. Also, an aggregate with an uninitialized component was not being pretty-printed properly. gcc/ada/ * pprint.adb (List_Name): Check for "Box_Present" when displaying a list, and emit "<>" if returns True. * sem_scil.adb (Check_SCIL_Node): Handle case when the type of a parameter is from a package that was mentioned in a limited with clause, and make no further checks, since this check routine does not have all the logic to check such a usage.
2024-01-09ada: Fix internal error on class-wide allocator inside if-expressionEric Botcazou1-2/+11
The problem is that the freeze node for the class-wide subtype built for the expression of the allocator escapes from the dependent expression instead of being stored in its list of actions. gcc/ada/ * freeze.adb (Freeze_Expression.Has_Decl_In_List): Deal specifically with itypes that are class-wide subtypes.
2024-01-09ada: Add __atomic_store_n binding to System.Atomic_PrimitivesEric Botcazou4-2/+55
This is modeled on the existing binding for __atomic_load_n. gcc/ada/ * libgnat/s-atopri.ads (Atomic_Store): New generic procedure. (Atomic_Store_8): New instantiated procedure. (Atomic_Store_16): Likewise. (Atomic_Store_32): Likewise. (Atomic_Store_64): Likewise. * libgnat/s-atopri__32.ads (Atomic_Store): New generic procedure. (Atomic_Store_8): New instantiated procedure. (Atomic_Store_16): Likewise. (Atomic_Store_32): Likewise. * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Implement the support for __atomic_store_n and __sync_bool_compare_and_swap_n. * gcc-interface/gigi.h (list_second): New inline function.
2024-01-09ada: Cannot requeue to a procedure implemented by an entryJavier Miranda2-0/+27
Add missing support for RM 9.5.4(5.6/4): the target of a requeue statement may be a procedure when its name denotes a renaming of an entry. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Specification): Do not replace the type of the formals with its corresponding record in init-procs. * sem_ch9.adb (Analyze_Requeue): Add missing support to requeue to a procedure that denotes a renaming of an entry.
2024-01-09ada: Remove side effects depending on the context of subtype declarationPiotr Trojanek1-11/+63
In GNATprove mode the removal of side effects is only needed in certain syntactic contexts, which include subtype declarations. Now this removal is limited to genuine subtype declarations and not to itypes coming from expressions where side effects are not expected. gcc/ada/ * exp_util.adb (Possible_Side_Effect_In_SPARK): Refine handling of itype declarations.
2024-01-09ada: More aggressive inlining of subprogram calls in GNATprove modePiotr Trojanek2-5/+11
Previously if a subprogram call could not be inlined in GNATprove mode, then all subsequent calls to the same subprogram were not inlined either (because a failed attempt to inline clears flag Is_Inlined_Always and we tested this flag when attempting to inline subsequent calls). Now a failure in inlining of a particular call does not prevent inlining of subsequent calls to the same subprogram, except when inlining failed because the subprogram was detected to be recursive (which clears the Is_Inlined flag that we now examine). This change allows more checks to be proved and reduces interactions between inlining and SPARK legality checks. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Specification): Set Is_Inlined flag by default in GNATprove mode. * sem_res.adb (Resolve_Call): Only look at flag which is cleared when inlined subprogram is detected to be recursive.
2024-01-09ada: Remove dead detection of recursive inlined subprogramsPiotr Trojanek1-19/+0
Inlining of subprogram calls happens in routine Expand_Inlined_Call which calls Establish_Actual_Mapping_For_Inlined_Call. Both routines had detection of recursive calls. The detection in the second routine was dead code. gcc/ada/ * inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Remove detection of recursive calls.
2024-01-09ada: Remove dead code for GNATprove inliningPiotr Trojanek1-13/+2
Removed code was dead because it could only be executed when Back_End_Inlining is True and that flag is always false in GNATprove_Mode. gcc/ada/ * inline.adb (Cannot_Inline): Cleanup use of 'Length; remove dead code.
2024-01-09ada: Fix uses of not PresentPiotr Trojanek2-2/+2
Fix style violation reported by GNATcheck. gcc/ada/ * sem_aggr.adb (Resolve_Container_Aggregate): Use "No". * sem_ch8.adb (Find_Direct_Name): Likewise.
2024-01-09ada: Fix bug in Sem_Util.Enclosing_DeclarationSteve Baird4-30/+8
Fix Sem_Util.Enclosing_Declaration to not return an N_Subprogram_Specification node. Remove code in various places that was formerly needed to cope with this misbehavior. gcc/ada/ * sem_util.adb (Enclosing_Declaration): Instead of returning a subprogram specification node, return its parent (which is presumably a subprogram declaration). * contracts.adb (Insert_Stable_Property_Check): Remove code formerly needed to compensate for incorrect behavior of Sem_Util.Enclosing_Declaration. * exp_attr.adb (In_Available_Context): Remove code formerly needed to compensate for incorrect behavior of Sem_Util.Enclosing_Declaration. * sem_ch8.adb (Is_Actual_Subp_Of_Inst): Remove code formerly needed to compensate for incorrect behavior of Sem_Util.Enclosing_Declaration.
2024-01-09ada: Error compiling Ada 2022 object renaming with no subtype markSteve Baird4-10/+40
In some cases the compiler would crash or generate spurious errors compiling a legal object renaming declaration that lacks a subtype mark. In addition to fixing the immediate problem, change Atree.Copy_Slots so that attempts to modify either the Empty or the Error nodes (e.g., by passing one of them as the target in a call to Rewrite) are ineffective. Cope with the consequences of this. gcc/ada/ * sem_ch8.adb (Check_Constrained_Object): Before updating the subtype mark of an object renaming declaration by calling Rewrite, first check whether the destination of the Rewrite call exists. * atree.adb (Copy_Slots): Return without performing any updates if Destination equals Empty or Error, or if Source equals Empty. Any of those conditions indicates an error case. * sem_ch12.adb (Analyze_Formal_Derived_Type): Avoid cascading errors. * sem_ch3.adb (Analyze_Number_Declaration): In an error case, do not pass Error as destination in a call to Rewrite. (Find_Type_Of_Subtype_Indic): In an error case, do not pass Error or Empty as destination in a call to Rewrite.
2024-01-09ada: Fix precondition in Interfaces.C.StringsJoffrey Huguet1-4/+5
The precondition of both Update procedures in Interfaces.C.Strings were incorrect. This patch fixes this. gcc/ada/ * libgnat/i-cstrin.ads (Update): Fix precondition.
2024-01-09ada: Remove unreachable code in Resolve_Extension_AggregateEric Botcazou1-38/+1
The only functions using the BIP protocol are now those returning a limited type: Is_Build_In_Place_Result_Type => Is_Inherently_Limited_Type. gcc/ada/ * sem_aggr.adb (Resolve_Extension_Aggregate): Remove the unreachable call to Transform_BIP_Assignment as well as the procedure.
2024-01-09ada: Avoid xref on out params of TSSBob Duff1-3/+9
For an actual passed as an 'in out' parameter of a type support subprogram such as deep finalize, do not count it as a read reference of the actual. Clearly these should not count. Furthermore, counting them causes different warnings in -gnatc mode compared to normal mode, because the calls only exist in normal mode, which would disable the warnings. Such warnings now occur in both modes, instead of just with -gnatc. gcc/ada/ * lib-xref.adb (Generate_Reference): Do not count it as a read reference if we're calling a TSS.
2024-01-09ada: Document new SPARK aspect and pragma Always_TerminatesPiotr Trojanek5-2137/+2178
Add description of a recently added SPARK contract. gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_rm/implementation_defined_pragmas.rst: Add sections for Always_Terminates. * gnat-style.texi: Regenerate. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2024-01-09Fix outdated commentEric Botcazou1-5/+4
gcc/ada/ PR ada/78207 * libgnat/g-regexp.ads: Fix outdated comment.
2024-01-09Fix internal error on function call returning extension of limited interfaceEric Botcazou2-77/+84
The problem occurs when this function call is the expression of a return in a function returning the limited interface; in this peculiar case, there is a mismatch between the callee, which has BIP formals but is not a BIP call, and the caller, which is a BIP function, that is spotted by an assertion. This is fixed by restoring the semantics of Is_Build_In_Place_Function_Call, which returns again true only for calls to BIP functions, introducing the Is_Function_Call_With_BIP_Formals predicate, which also returns true for calls to functions with BIP formals that are not BIP functions, and moving down the assertion in Expand_Simple_Function_Return. gcc/ada/ PR ada/112781 * exp_ch6.ads (Is_Build_In_Place_Function): Adjust description. * exp_ch6.adb (Is_True_Build_In_Place_Function_Call): Delete. (Is_Function_Call_With_BIP_Formals): New predicate. (Is_Build_In_Place_Function_Call): Restore original semantics. (Expand_Call_Helper): Adjust conditions guarding the calls to Add_Dummy_Build_In_Place_Actuals to above renaming. (Expand_N_Extended_Return_Statement): Adjust to above renaming. (Expand_Simple_Function_Return): Likewise. Move the assertion to after the transformation into an extended return statement. (Make_Build_In_Place_Call_In_Allocator): Remove unreachable code. (Make_Build_In_Place_Call_In_Assignment): Likewise. gcc/testsuite/ * gnat.dg/bip_prim_func2.adb: New test. * gnat.dg/bip_prim_func2_pkg.ads, gnat.dg/bip_prim_func2_pkg.adb: New helper package.
2024-01-09Fix internal error on function call returning extension of limited interfaceEric Botcazou2-3/+4
This is a regression present on the mainline and 13 branch, in the form of a series of internal errors (3) on a function call returning the extension of a limited interface. This is only a partial fix for the first two assertion failures; the third one is the most problematic and will be dealt with separately. The first issue is in Instantiate_Type, where we use Base_Type in a specific case to compute the ancestor of a derived type, which will later trigger the assertion on line 16960 of sem_ch3.adb since Parent_Base and Generic_Actual are the same node. This is changed to use Etype like in other cases around. The second issue is an unprotected use of Designated_Type on type T in Analyze_Explicit_Dereference, while another use in an equivalent context is guarded by Is_Access_Type a few lines above. gcc/ada PR ada/112781 * sem_ch12.adb (Instantiate_Type): Use Etype instead of Base_Type consistently to retrieve the ancestor for a derived type. * sem_ch4.adb (Analyze_Explicit_Dereference): Test Is_Access_Type consistently before accessing Designated_Type.
2024-01-09Fix internal error on anonymous access type equalityEric Botcazou1-8/+4
This is a small regression present on the mainline and 13 branch, in the form of an internal error in gigi on anonymous access type equality. We now need to also accept them for anonymous access types that point to compatible object subtypes in the language sense. gcc/ada/ * gcc-interface/utils2.cc (build_binary_op) <EQ_EXPR>: Relax assertion for regular pointer types. gcc/testsuite/ * gnat.dg/specs/anon4.ads: New test.
2024-01-05Daily bump.GCC Administrator1-0/+5
2024-01-04Add generated .opt.urls filesDavid Malcolm1-0/+30
Changed in v5: regenerated Changed in v4: regenerated Changed in v3: regenerated Changed in v2: the files now contain some lang-specific URLs. gcc/ada/ChangeLog: * gcc-interface/lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/analyzer/ChangeLog: * analyzer.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/c-family/ChangeLog: * c.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/ChangeLog: * common.opt.urls: New file, autogenerated by regenerate-opt-urls.py. * config/aarch64/aarch64.opt.urls: Likewise. * config/alpha/alpha.opt.urls: Likewise. * config/alpha/elf.opt.urls: Likewise. * config/arc/arc-tables.opt.urls: Likewise. * config/arc/arc.opt.urls: Likewise. * config/arm/arm-tables.opt.urls: Likewise. * config/arm/arm.opt.urls: Likewise. * config/arm/vxworks.opt.urls: Likewise. * config/avr/avr.opt.urls: Likewise. * config/bpf/bpf.opt.urls: Likewise. * config/c6x/c6x-tables.opt.urls: Likewise. * config/c6x/c6x.opt.urls: Likewise. * config/cris/cris.opt.urls: Likewise. * config/cris/elf.opt.urls: Likewise. * config/csky/csky.opt.urls: Likewise. * config/csky/csky_tables.opt.urls: Likewise. * config/darwin.opt.urls: Likewise. * config/dragonfly.opt.urls: Likewise. * config/epiphany/epiphany.opt.urls: Likewise. * config/fr30/fr30.opt.urls: Likewise. * config/freebsd.opt.urls: Likewise. * config/frv/frv.opt.urls: Likewise. * config/ft32/ft32.opt.urls: Likewise. * config/fused-madd.opt.urls: Likewise. * config/g.opt.urls: Likewise. * config/gcn/gcn.opt.urls: Likewise. * config/gnu-user.opt.urls: Likewise. * config/h8300/h8300.opt.urls: Likewise. * config/hpux11.opt.urls: Likewise. * config/i386/cygming.opt.urls: Likewise. * config/i386/cygwin.opt.urls: Likewise. * config/i386/djgpp.opt.urls: Likewise. * config/i386/i386.opt.urls: Likewise. * config/i386/mingw-w64.opt.urls: Likewise. * config/i386/mingw.opt.urls: Likewise. * config/i386/nto.opt.urls: Likewise. * config/ia64/ia64.opt.urls: Likewise. * config/ia64/ilp32.opt.urls: Likewise. * config/ia64/vms.opt.urls: Likewise. * config/iq2000/iq2000.opt.urls: Likewise. * config/linux-android.opt.urls: Likewise. * config/linux.opt.urls: Likewise. * config/lm32/lm32.opt.urls: Likewise. * config/loongarch/loongarch.opt.urls: Likewise. * config/lynx.opt.urls: Likewise. * config/m32c/m32c.opt.urls: Likewise. * config/m32r/m32r.opt.urls: Likewise. * config/m68k/ieee.opt.urls: Likewise. * config/m68k/m68k-tables.opt.urls: Likewise. * config/m68k/m68k.opt.urls: Likewise. * config/m68k/uclinux.opt.urls: Likewise. * config/mcore/mcore.opt.urls: Likewise. * config/microblaze/microblaze.opt.urls: Likewise. * config/mips/mips-tables.opt.urls: Likewise. * config/mips/mips.opt.urls: Likewise. * config/mips/sde.opt.urls: Likewise. * config/mmix/mmix.opt.urls: Likewise. * config/mn10300/mn10300.opt.urls: Likewise. * config/moxie/moxie.opt.urls: Likewise. * config/msp430/msp430.opt.urls: Likewise. * config/nds32/nds32-elf.opt.urls: Likewise. * config/nds32/nds32-linux.opt.urls: Likewise. * config/nds32/nds32.opt.urls: Likewise. * config/netbsd-elf.opt.urls: Likewise. * config/netbsd.opt.urls: Likewise. * config/nios2/elf.opt.urls: Likewise. * config/nios2/nios2.opt.urls: Likewise. * config/nvptx/nvptx-gen.opt.urls: Likewise. * config/nvptx/nvptx.opt.urls: Likewise. * config/openbsd.opt.urls: Likewise. * config/or1k/elf.opt.urls: Likewise. * config/or1k/or1k.opt.urls: Likewise. * config/pa/pa-hpux.opt.urls: Likewise. * config/pa/pa-hpux1010.opt.urls: Likewise. * config/pa/pa-hpux1111.opt.urls: Likewise. * config/pa/pa-hpux1131.opt.urls: Likewise. * config/pa/pa.opt.urls: Likewise. * config/pa/pa64-hpux.opt.urls: Likewise. * config/pdp11/pdp11.opt.urls: Likewise. * config/pru/pru.opt.urls: Likewise. * config/riscv/riscv.opt.urls: Likewise. * config/rl78/rl78.opt.urls: Likewise. * config/rpath.opt.urls: Likewise. * config/rs6000/476.opt.urls: Likewise. * config/rs6000/aix64.opt.urls: Likewise. * config/rs6000/darwin.opt.urls: Likewise. * config/rs6000/linux64.opt.urls: Likewise. * config/rs6000/rs6000-tables.opt.urls: Likewise. * config/rs6000/rs6000.opt.urls: Likewise. * config/rs6000/sysv4.opt.urls: Likewise. * config/rtems.opt.urls: Likewise. * config/rx/elf.opt.urls: Likewise. * config/rx/rx.opt.urls: Likewise. * config/s390/s390.opt.urls: Likewise. * config/s390/tpf.opt.urls: Likewise. * config/sh/sh.opt.urls: Likewise. * config/sh/superh.opt.urls: Likewise. * config/sol2.opt.urls: Likewise. * config/sparc/long-double-switch.opt.urls: Likewise. * config/sparc/sparc.opt.urls: Likewise. * config/stormy16/stormy16.opt.urls: Likewise. * config/v850/v850.opt.urls: Likewise. * config/vax/elf.opt.urls: Likewise. * config/vax/vax.opt.urls: Likewise. * config/visium/visium.opt.urls: Likewise. * config/vms/vms.opt.urls: Likewise. * config/vxworks-smp.opt.urls: Likewise. * config/vxworks.opt.urls: Likewise. * config/xtensa/elf.opt.urls: Likewise. * config/xtensa/uclinux.opt.urls: Likewise. * config/xtensa/xtensa.opt.urls: Likewise. gcc/d/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/fortran/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/go/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/lto/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/m2/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/ChangeLog: * params.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/rust/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2024-01-04Daily bump.GCC Administrator1-0/+5
2024-01-03Update copyright dates.Jakub Jelinek2-2/+2
Manual part of copyright year updates. 2024-01-03 Jakub Jelinek <jakub@redhat.com> gcc/ * gcc.cc (process_command): Update copyright notice dates. * gcov-dump.cc (print_version): Ditto. * gcov.cc (print_version): Ditto. * gcov-tool.cc (print_version): Ditto. * gengtype.cc (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. gcc/d/ * gdc.texi: Bump @copyrights-d year. gcc/fortran/ * gfortranspec.cc (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/go/ * gccgo.texi: Bump @copyrights-go year. libgomp/ * libgomp.texi: Bump @copying's copyright year. libitm/ * libitm.texi: Bump @copying's copyright year. libquadmath/ * libquadmath.texi: Bump @copying's copyright year.
2024-01-03Rotate ChangeLog files.Jakub Jelinek2-6973/+6979
Rotate ChangeLog files for ChangeLogs with yearly cadence.
2023-12-20Daily bump.GCC Administrator1-0/+215
2023-12-19ada: Add makefile targets for building/installing html docMarc Poulhiès1-4/+31
Add the ada.html and ada.install-html targets so that we can build the html with `make html`. gcc/ada/ * gcc-interface/Make-lang.in (ada.html, ada.install-html): Add.
2023-12-19ada: Fix internal error on call with parameter of predicated subtypeEric Botcazou2-10/+8
The problem is that the predicated subtype does not inherit all the required attributes of a string subtype with a static predicate. gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): Remove a short-circuit for subtypes without aspects when it comes to predicates. * sem_util.adb (Inherit_Predicate_Flags): Deal with private subtypes whose full view is an Itype.
2023-12-19ada: Check all interfaces for valid iterator typeViljar Indus1-13/+90
gcc/ada/ * sem_ch13.adb (Valid_Default_Iterator): Check all interfaces for valid iterator type. Also improve error reporting.
2023-12-19ada: Missing error on positional container aggregates for types with Add_NamedGary Dismukes1-3/+17
The compiler fails to reject a container aggregate written using positional notation when the container type specifies an Add_Named operation in its Aggregate aspect. Container aggregates for such types must be written using named associations. The compiler ignores the positional associations and produces an empty aggregate object. An error check is added to catch such illegal container aggregates. gcc/ada/ * sem_aggr.adb (Resolve_Container_Aggregate): In the Add_Named case, issue an error if the container aggregate is written as a positional aggregate, since such an aggregate must have named associations.
2023-12-19ada: Remove GNATcheck violationsSheri Bernstein1-10/+8
Remove GNATcheck violations by refactoring code and also using pragma Annotate to exempt them. gcc/ada/ * libgnat/a-comlin.adb (Argument_Count): Rewrite code so there is only one return, to remove Improper_Returns violation. (Command_Name): Add pragma to exempt Improper_Returns violation.
2023-12-19ada: Rework comment in Expand_Ctrl_Function_CallEric Botcazou1-1/+6
This expands on the reason for properly guarding the transformation. gcc/ada/ * exp_ch6.adb (Expand_Ctrl_Function_Call): Rework last comment.
2023-12-19ada: Compiler hangs on container aggregate with function call as key expressionGary Dismukes1-2/+2
The compiler hangs (or may crash, if assertions are enabled) when compiling an iterated association of a container aggregate that has a key expression given by a function call. The resolution of the call leads to a blowup in Build_Call_Marker, because the temporary copy of the expression that's analyzed has an Empty parent, causing insertion of the call marker to fail. The fix for this is to preanalyze, rather than analyze, the copy of the key expression (Build_Call_Marker will return without creating a call marker in the case of preanalysis). gcc/ada/ * sem_aggr.adb (Resolve_Iterated_Association): Call Preanalyze_And_Resolve instead of Analyze_And_Resolve on a key expression of an iterated association.
2023-12-19ada: Fix style and typos in commentsPiotr Trojanek3-4/+4
Code cleanup. gcc/ada/ * exp_ch9.adb, sem_ch10.adb, sem_util.adb: Fix comments.
2023-12-19ada: Remove unreferenced utility routine Get_Logical_Line_Number_ImgPiotr Trojanek2-18/+0
Routine Get_Logical_Line_Number_Img was introduced for splitting of Pre/Post contracts, but subsequent patch for that feature removed its only use. It was then used by GNATprove, but that use is now removed as well. gcc/ada/ * sinput.adb, sinput.ads (Get_Logical_Line_Number_Img): Remove.
2023-12-19ada: gnatbind: Do not generate Ada.Command_Line references when not usedPatrick Bernardi1-13/+42
It was previously assumed that configurable runtimes could not return exit statuses, however this assumption no longer holds. Instead, only import the required symbols from Ada.Command_Line's support packages if Ada.Command_Line is in the closure of the partition when a configurable runtime is used. gcc/ada/ * bindgen.adb (Command_Line_Used): New object. (Gen_Main): Only generate references to symbols used by Ada.Command_Line if the package is used by the partition. (Gen_Output_File_Ada): Ditto. (Resolve_Binder_Options): Check if Ada.Command_Line is in the closure of the partition.