- Jan 10, 2024
-
-
rdubner authored
-
rdubner authored
-
rdubner authored
-
rdubner authored
-
James K. Lowden authored
-
James K. Lowden authored
-
rdubner authored
-
GCC Administrator authored
-
- Jan 09, 2024
-
-
James K. Lowden authored
-
James K. Lowden authored
-
James K. Lowden authored
-
James K. Lowden authored
-
James K. Lowden authored
-
rdubner authored
-
rdubner authored
-
James K. Lowden authored
-
Eric Botcazou authored
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.
-
Javier Miranda authored
Add dummy build-in-place parameters when a BIP function does not require the BIP parameters but it is a dispatching operation that inherited them. gcc/ada/ * einfo-utils.adb (Underlying_Type): Protect recursion call against non-available attribute Etype. * einfo.ads (Protected_Subprogram): Fix typo in documentation. * exp_ch3.adb (BIP_Function_Call_Id): New subprogram. (Expand_N_Object_Declaration): Improve code that evaluates if the object is initialized with a BIP function call. * exp_ch6.adb (Is_True_Build_In_Place_Function_Call): New subprogram. (Add_Task_Actuals_To_Build_In_Place_Call): Add dummy actuals if the function does not require the BIP task actuals but it is a dispatching operation that inherited them. (Build_In_Place_Formal): Improve code to avoid never-ending loop if the BIP formal is not found. (Add_Dummy_Build_In_Place_Actuals): New subprogram. (Expand_Call_Helper): Add calls to Add_Dummy_Build_In_Place_Actuals. (Expand_N_Extended_Return_Statement): Adjust assertion. (Expand_Simple_Function_Return): Adjust assertion. (Make_Build_In_Place_Call_In_Allocator): No action needed if the called function inherited the BIP extra formals but it is not a true BIP function. (Make_Build_In_Place_Call_In_Assignment): Ditto. * exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove code reporting unsupported case (since this patch adds support for it). * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Adding assertion to ensure matching of BIP formals when setting the Protected_Formal field of a protected subprogram to reference the corresponding extra formal of the subprogram that implements it. (Might_Need_BIP_Task_Actuals): New subprogram. (Create_Extra_Formals): Improve code adding inherited extra formals.
-
Eric Botcazou authored
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.
-
Eric Botcazou authored
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.
-
Eric Botcazou authored
This is a small regression present on the mainline and 13 branch, although the underlying problem has probably been there for ages, in the form of a segfault during the delay slot scheduling pass, for a function that falls through to exit without any instruction generated for the end of function. gcc/ PR rtl-optimization/113140 * reorg.cc (fill_slots_from_thread): If we are to branch after the last instruction of the function, create an end label. gcc/testsuite/ * g++.dg/opt/delay-slot-2.C: New test.
-
GCC Administrator authored
-
- Jan 08, 2024
-
-
rdubner authored
-
rdubner authored
-
James K. Lowden authored
-
rdubner authored
-
James K. Lowden authored
-
James K. Lowden authored
-
rdubner authored
-
rdubner authored
-
James K. Lowden authored
-
James K. Lowden authored
-
James K. Lowden authored
-
Jonathan Wakely authored
Backport the extra tests from r14-3300-g023a62b77f999b. libstdc++-v3/ChangeLog: * testsuite/std/format/functions/format.cc: Add more checks for wstring formatting of arithmetic types.
-
Jonathan Wakely authored
This change ensures that char and wchar_t arguments are formatted consistently when using integer presentation types. This avoids non-portable std::format output that depends on whether char and wchar_t happen to be signed or unsigned on the target. Formatting '\xff' as an integer will now always format 255 and not sometimes -1. This was approved in Kona 2023 as a DR for C++20 so the change is implemented unconditionally. Also make character formatters check for _Pres_c explicitly and call _M_format_character directly. This avoid the overhead of calling format and _S_to_character and then calling _M_format_character anyway. libstdc++-v3/ChangeLog: * include/std/format (formatter<C, C>::format): Check for _Pres_c and call _M_format_character directly. Cast C to its unsigned equivalent for formatting as an integer. (formatter<char, wchar_t>::format): Likewise. (basic_format_arg(T&)): Store char arguments as unsigned char for formatting to a wide string. (__cpp_lib_format_uchar): Define. * include/std/version (__cpp_lib_format_uchar): Define. * testsuite/std/format/functions/format.cc: Adjust test. Check formatting of characters using all integer presentation types. (cherry picked from commit 74a0dab1)
-
Georg-Johann Lay authored
so they work with all combinations of -f[no-]data-sections -f[no-]common. The patch also improves some diagnostics and adds additional checks, for example these attributes must only be applied to variables in static storage. gcc/ PR target/112952 * config/avr/avr.cc (avr_handle_addr_attribute): Also print valid range when diagnosing attribute "io" and "io_low" are out of range. (avr_eval_addr_attrib): Don't ICE on empty address at that place. (avr_insert_attributes): Reject if attribute "address", "io" or "io_low" in contexts other than static storage. (avr_asm_output_aligned_decl_common): Move output of decls with attribute "address", "io", and "io_low" to... (avr_output_addr_attrib): ...this new function. (avr_asm_asm_output_aligned_bss): Remove output for decls with attribute "address", "io", and "io_low". (avr_encode_section_info): Rectify handling of decls with attribute "address", "io", and "io_low". gcc/testsuite/ PR target/112952 * gcc.target/avr/attribute-io.h: New file. * gcc.target/avr/pr112952-0.c: New test. * gcc.target/avr/pr112952-1.c: New test. * gcc.target/avr/pr112952-2.c: New test. * gcc.target/avr/pr112952-3.c: New test. (cherry picked from commit c131b1d5)
-
GCC Administrator authored
-
- Jan 07, 2024
-
-
GCC Administrator authored
-
- Jan 06, 2024
-
-
Jonathan Wakely authored
The new __is_convertible built-in should only be used after checking that it's supported. libstdc++-v3/ChangeLog: PR libstdc++/113241 * include/std/type_traits (is_convertible_v): Guard use of built-in with preprocessor check. (cherry picked from commit 57fa5b60)
-