aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2024-07-19Update ChangeLog and version files for releasereleases/gcc-11.5.0releases/gcc-11Richard Biener1-0/+4
2024-06-30Daily bump.GCC Administrator1-0/+5
2024-06-29Ada, Darwin : Use DSYMUTIL_FOR_TARGET in libgnat/gnarl builds.Iain Sandoe1-2/+2
Most of the time we get away with using the dsymutil that is installed with the latest Xcode, however for some cross-compilation cases that does not work. We now have the ability to specify the correct dsymutil to use for the toolchain (--with-dsymutil=) and we should use that specified tool for debug link. Fixes cross-compilers from x86-64 to powerpc. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Use DSYMUTIL_FOR_TARGET in libgnat/libgnarl recipies.
2024-03-08Daily bump.GCC Administrator1-0/+6
2024-03-07Fix bogus error on allocator for array type with Dynamic_PredicateEric Botcazou1-2/+0
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, remove call to Apply_Predicate_Check. 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.
2023-05-29Update ChangeLog and version files for releasereleases/gcc-11.4.0Jakub Jelinek1-0/+4
2022-04-21Update ChangeLog and version files for releasereleases/gcc-11.3.0Richard Biener1-0/+4
2022-03-25Daily bump.GCC Administrator1-0/+6
2022-03-24Properly reset the port handle when closingPascal Obry2-0/+2
When the serial port is closed, we need to ensure that the port handle is properly reset for it to be detected as closed. gcc/ada/ PR ada/104767 * libgnat/g-sercom__mingw.adb (Close): Reset port handle to -1. * libgnat/g-sercom__linux.adb (Close): Likewise.
2022-03-17Daily bump.GCC Administrator1-0/+9
2022-03-16ada/104861 - use target_noncanonial for Target_NameRichard Biener1-1/+2
The following arranges for s-oscons.ads to record target_noncanonical for Target_Name, matching the install directory layout and what gcc -dumpmachine says. This fixes build issues with gprbuild. 2022-03-10 Richard Biener <rguenther@suse.de> PR ada/104861 gcc/ada/ * gcc-interface/Makefile.in (target_noncanonical): Substitute. (OSCONS_CPP): Pass target_noncanonical as TARGET. (cherry picked from commit 9467e7331188705ec16c086b77e1809c5b0aab7d)
2022-02-14Daily bump.GCC Administrator1-0/+10
2022-02-13[Ada] PR ada/98724: Alpha/Linux/libada: Use wraplf for Aux_Long_Long_FloatMaciej W. Rozycki1-0/+1
Use the Long Long Float wrapper in terms of Long Float for Alpha/Linux targets as well, fixing gnatlib compilation errors: a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on result [enabledby default] a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on parameter 1 [enabled by default] a-nallfl.ads:48:13: warning: profile of "Sin" doesn't match the builtin it binds [enabled by default] etc. with the `alpha-linux-gnu' target. gcc/ada/ PR ada/98724 PR ada/97504 * Makefile.rtl (LIBGNAT_TARGET_PAIRS) <alpha*-*-linux*>: Use wraplf version of Aux_Long_Long_Float. (cherry picked from commit 4493c5a2030d9191761d159067815b5f0325a9d2)
2022-01-29Daily bump.GCC Administrator1-0/+6
2022-01-28Fix wrong operator for universal_integer operands in instanceEric Botcazou1-1/+5
This is a regression present on mainline and 11 branch: the transformation applied during expansion by Narrow_Large_Operation would incorrectly perform name resolution for the operator again. gcc/ada/ PR ada/104258 * exp_ch4.adb (Narrow_Large_Operation): Also copy the entity, if any, when rewriting the operator node. gcc/testsuite/ * gnat.dg/generic_comp.adb: New test.
2022-01-20Daily bump.GCC Administrator1-0/+22
2022-01-19[Ada] Set target_cpu to x32 for x86_64-linux-gnux32H.J. Lu1-0/+7
Since the x86_64-linux-gnux32 compiler is actually an x32 compiler, set target_cpu to x32 for x86_64-linux-gnux32. PR ada/103538 * gcc-interface/Makefile.in (target_cpu): Set to x32 for x86_64-linux-gnux32. (cherry picked from commit 2cef99175af1ad95283d4b35bced73c3a510f6d6)
2022-01-19[Ada] Compile s-mmap and 128bit on x86_64-linux-gnux32H.J. Lu1-0/+5
PR ada/103538 * Makefile.rtl (LIBGNAT_TARGET_PAIRS): Add $(TRASYM_DWARF_UNIX_PAIRS), s-tsmona.adb<libgnat/s-tsmona__linux.adb, $(GNATRTL_128BIT_PAIRS). (EXTRA_GNATRTL_NONTASKING_OBJS): Add $(TRASYM_DWARF_UNIX_OBJS) and $(GNATRTL_128BIT_OBJS). (cherry picked from commit 9d6c63ba490ec92245f04b5cbafc56abd28e8d22)
2021-10-21Daily bump.GCC Administrator1-0/+6
2021-10-20Avoid exception propagation during bootstrapArnaud Charlet1-5/+69
This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for 32-bit Windows in the MSYS setup. The PR shows that we cannot rely on exception propagation being operational during the bootstrap, at least on the 11 branch, so fix this by removing the problematic raise statement. gcc/ada/ PR ada/100486 * sem_prag.adb (Check_Valid_Library_Unit_Pragma): Do not raise an exception as part of the bootstrap.
2021-10-01Daily bump.GCC Administrator1-0/+80
2021-09-30[Ada] Minor tweaks to System.Dwarf_LineEric Botcazou1-7/+8
gcc/ada/ * libgnat/s-dwalin.adb (Parse_Header): Tweak comments. (Read_Entry_Format_Array): Tweak exception message. (Symbolic_Address.Set_Result): Likewise.
2021-09-30[Ada] Small optimization to DWARF 5 mode in System.Dwarf_LineEric Botcazou1-6/+12
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-30[Ada] Follow-up tweaks to System.Dwarf_LineEric Botcazou1-8/+7
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-30[Ada] Adjust latest change for ELF platformsEric Botcazou1-6/+5
gcc/ada/ * libgnat/s-objrea.adb (Get_Load_Address): Return 0 for ELF.
2021-09-30[Ada] Add support for PE-COFF PIE to System.Dwarf_LineEric Botcazou5-67/+111
gcc/ada/ * adaint.c (__gnat_get_executable_load_address): Add Win32 support. * libgnat/s-objrea.ads (Get_Xcode_Bounds): Fix typo in comment. (Object_File): Minor reformatting. (ELF_Object_File): Uncomment predicate. (PECOFF_Object_File): Likewise. (XCOFF32_Object_File): Likewise. * libgnat/s-objrea.adb: Minor reformatting throughout. (Get_Load_Address): Implement for PE-COFF. * libgnat/s-dwalin.ads: Remove clause for System.Storage_Elements and use consistent wording in comments. (Dwarf_Context): Set type of Low, High and Load_Address to Address. * libgnat/s-dwalin.adb (Get_Load_Displacement): New function. (Is_Inside): Call Get_Load_Displacement. (Low_Address): Likewise. (Open): Adjust to type change. (Aranges_Lookup): Change type of Addr to Address. (Read_Aranges_Entry): Likewise for Start and adjust. (Enable_Cach): Adjust to type change. (Symbolic_Address): Change type of Addr to Address. (Symbolic_Traceback): Call Get_Load_Displacement.
2021-09-30[Ada] Small cleanup in System.Dwarf_LineEric Botcazou2-9/+6
gcc/ada/ * libgnat/s-dwalin.ads: Remove clause for Ada.Exceptions.Traceback, add clause for System.Traceback_Entries and alphabetize. (AET): Delete. (STE): New package renaming. (Symbolic_Traceback): Adjust. * libgnat/s-dwalin.adb: Remove clauses for Ada.Exceptions.Traceback and System.Traceback_Entries. (Symbolic_Traceback): Adjust.
2021-09-30[Ada] Add DWARF 5 support to System.Dwarf_LineEric Botcazou2-313/+653
gcc/ada/ * libgnat/s-dwalin.ads: Adjust a few comments left and right. (Line_Info_Register): Comment out unused components. (Line_Info_Header): Add DWARF 5 support. (Dwarf_Context): Likewise. Rename "prologue" into "header". * libgnat/s-dwalin.adb: Alphabetize "with" clauses. (DWARF constants): Add DWARF 5 support and reorder. (For_Each_Row): Adjust. (Initialize_Pass): Likewise. (Initialize_State_Machine): Likewise and fix typo. (Open): Add DWARF 5 support. (Parse_Prologue): Rename into... (Parse_Header): ...this and add DWARF 5 support. (Read_And_Execute_Isn): Rename into... (Read_And_Execute_Insn): ...this and adjust. (To_File_Name): Change parameter name and add DWARF 5 support. (Read_Entry_Format_Array): New procedure. (Skip_Form): Add DWARF 5 support and reorder. (Seek_Abbrev): Do not count entries and add DWARF 5 support. (Debug_Info_Lookup): Add DWARF 5 support. (Symbolic_Address.Set_Result): Likewise. (Symbolic_Address): Adjust.
2021-09-15Daily bump.GCC Administrator1-0/+35
2021-09-14Fix PR ada/101970Eric Botcazou1-10/+13
This is a regression present on the mainline and 11 branch in the form of an ICE for an enumeration type with a full signed representation for its size. gcc/ada/ PR ada/101970 * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Enum_Rep>: Use an unchecked conversion instead of a regular conversion in the enumeration case and remove Conversion_OK flag in the integer case. <Attribute_Pos>: Remove superfluous test. gcc/testsuite/ * gnat.dg/enum_rep2.adb: New test.
2021-09-14Do not issue size error for too large array typeEric Botcazou1-2/+1
The error is to be issued when objects of the type are declared instead. gcc/ada/ * gcc-interface/decl.c (validate_size): Do not issue an error if the old size has overflowed.
2021-09-14Fix inaccurate bounds in debug info for vector array typesEric Botcazou1-0/+8
They should not be 0-based, unless the array type itself is. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): For vector types, make the representative array the debug type.
2021-09-14Fix internal error on pointer-to-pointer binding in LTO modeEric Botcazou1-1/+5
gcc/ada/ * gcc-interface/utils.c (update_pointer_to): Set TYPE_CANONICAL on pointer and reference types.
2021-09-14Remove superfluous call to UI_Is_In_Int_RangeEric Botcazou1-2/+1
gcc/ada/ * gcc-interface/utils.c (can_materialize_object_renaming_p): Do not call UI_Is_In_Int_Range on the result of Normalized_First_Bit.
2021-09-14Give more informative error message for by-reference typesEric Botcazou1-4/+10
Recent compilers enforce more strictly the RM C.6(18) clause, which says that volatile record types are by-reference types. This changes the typical error message now given in these cases. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <is_type>: Declare new constant. Adjust error message issued by validate_size in the case of by-reference types. (validate_size): Always use the error strings passed by the caller.
2021-07-28Update ChangeLog and version files for releasereleases/gcc-11.2.0Richard Biener1-0/+4
2021-07-10Daily bump.GCC Administrator1-0/+4
2021-07-09Missing piece in earlier changeEric Botcazou1-3/+0
gcc/ada/ * gcc-interface/utils.c (finish_subprog_decl): Remove obsolete line.
2021-07-02Daily bump.GCC Administrator1-0/+6
2021-07-01Use intermediate integer type with proper signednessEric Botcazou1-4/+3
This is a minor regression present on mainline and 11 branch, whereby the value of the Enum_Rep attribute is always unsigned. gcc/ada/ PR ada/101094 * exp_attr.adb (Get_Integer_Type): Return an integer type with the same signedness as the input type.
2021-06-04Daily bump.GCC Administrator1-0/+7
2021-06-03Fix miscompilation of predicate on bit-packed array typesEric Botcazou1-15/+22
This is a regression present on the mainline and 11 branch in the form of a miscompilation by the new mod/ref IPA pass of code that passes constrained bit-packed array objets in a call to a subprograms taking unconstrained bit-packed array parameters, which occurs for predicate on bit-packed array types for example. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Add PAT local constant and use it throughout. If it is set, use a ref-all pointer type for the pointer-to-array field of the fat pointer type. <E_Array_Subtype>: Add PAT local constant and use it throughout. gcc/testsuite/ * gnat.dg/bit_packed_array6.adb: New test. * gnat.dg/bit_packed_array6_pkg.ads: New helper.
2021-05-22Daily bump.GCC Administrator1-0/+22
2021-05-21Fix internal error on locally derived bit-packed array typeEric Botcazou1-5/+9
This is a regression present on the mainline, 11 and 10 branches, in the form of an ICE on a locally derived bit-packed array type. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Process the implementation type of a packed type implemented specially. gcc/testsuite/ * gnat.dg/derived_type7.adb, gnat.dg/derived_type7.ads: New test.
2021-05-21Always translate Is_Pure flag into pure in C senseEric Botcazou1-26/+21
Gigi has historically translated the Is_Pure flag of the front-end into the "const" attribute of GNU C. That's correct for subprograms of pure Ada units, but not fully exact according to the semantics of the flag. gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Always translate the Is_Pure flag into the "pure" attribute of GNU C.
2021-05-21Fix segfault at run time on strict-alignment platformsEric Botcazou1-1/+5
This fixes a regression present on the mainline and 11 branch by restricting the problematic change dealing with bitfields whose nomimal subtype is self-referential to the cases where the size is really lower. gcc/ada/ * gcc-interface/trans.c (Call_to_gnu): Restrict previous change to bitfields whose size is not equal to the type size. (gnat_to_gnu): Likewise.
2021-05-21Fix incorrect SLOC on instructionEric Botcazou1-2/+4
This puts the missing SLOC on a statement generated by a return. gcc/ada/ * gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Put a SLOC on the assignment from the return value to the return object in the copy-in/copy-out case.
2021-04-27Update ChangeLog and version files for releaseJakub Jelinek1-0/+4