- May 06, 2021
-
-
GCC Administrator authored
-
- May 05, 2021
-
-
Eric Botcazou authored
This is a regression for 64-bit Windows present from mainline down to the 9 branch and introduced by the fix for PR target/99234. Again SEH, but with a twist related to the way MinGW implements setjmp/longjmp, which turns out to be piggybacked on SEH with recent versions of MinGW, i.e. the longjmp performs a bona-fide unwinding of the stack, because it calls RtlUnwindEx with the second argument initially passed to setjmp, which is the result of __builtin_frame_address (0) in the MinGW header file: define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0)) This means that we directly expose the frame pointer to the SEH machinery here (unlike with regular exception handling where we use an intermediate CFA) and thus that we cannot do whatever we want with it. The old code would leave it unaligned, i.e. not multiple of 16, whereas the new code aligns it, but this breaks for some reason; at least it appears that a .seh_setframe directive with 0 as second argument always works, so the fix aligns it this way. gcc/ PR target/100402 * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target, always return the establisher frame for __builtin_frame_address (0). gcc/testsuite/ * gcc.c-torture/execute/20210505-1.c: New test.
-
Ivan Sorokin authored
GCC -O2 generated quite bad code for this function: bool f (void) { return __builtin_cpu_supports("popcnt") && __builtin_cpu_supports("ssse3"); } f: movl __cpu_model+12(%rip), %edx movl %edx, %eax shrl $6, %eax andl $1, %eax andl $4, %edx movl $0, %edx cmove %edx, %eax ret The problem was caused by the fact that internally every invocation of __builtin_cpu_supports built a new variable __cpu_model and a new type __processor_model. Because of this, GIMPLE level optimizers weren't able to CSE the loads of __cpu_model and optimize bit-operations properly. Improve GCC -O2 code generation by caching __cpu_model and__cpu_features2 variables as well as their types: f: movl __cpu_model+12(%rip), %eax andl $68, %eax cmpl $68, %eax sete %al ret 2021-05-05 Ivan Sorokin <vanyacpp@gmail.com> H.J. Lu <hjl.tools@gmail.com> gcc/ PR target/91400 * config/i386/i386-builtins.c (ix86_cpu_model_type_node): New. (ix86_cpu_model_var): Likewise. (ix86_cpu_features2_type_node): Likewise. (ix86_cpu_features2_var): Likewise. (fold_builtin_cpu): Cache __cpu_model and __cpu_features2 with their types. gcc/testsuite/ PR target/91400 * gcc.target/i386/pr91400-1.c: New test. * gcc.target/i386/pr91400-2.c: Likewise.
-
Martin Sebor authored
gcc/ChangeLog: * passes.def (pass_warn_printf): Run after SSA. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/builtin-sprintf-warn-26.c: New test.
-
Patrick Palka authored
These constraints are already present on the template we're partially specializing for. libstdc++-v3/ChangeLog: * include/bits/ranges_util.h (enable_borrowed_range<subrange>): Remove constraints on this partial specialization. * include/std/ranges (enable_borrowed_range<iota_view>): Likewise.
-
Patrick Palka authored
libstdc++-v3/ChangeLog: * include/std/ranges (transform_view::_Iterator::iter_swap): Remove as per LWG 3520. (join_view::_Iterator::iter_swap): Add indirectly_swappable constraint as per LWG 3517.
-
Prathamesh Kulkarni authored
gcc/ChangeLog: 2021-05-05 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * config/arm/neon.md (neon_vtst_combine<mode>): New pattern. * config/arm/predicates.md (minus_one_operand): New predicate.
-
Jeff Law authored
gcc/ * config/avr/avr.md: Remove references to CC_STATUS_INIT.
-
Stefan Schulze Frielinghaus authored
For move2add_valid_value_p we also have to ask the target whether a register can be accessed in a different mode than it was set before. gcc/ChangeLog: PR rtl-optimization/100263 * postreload.c (move2add_valid_value_p): Ensure register can change mode.
-
Eric Botcazou authored
This is the bootstrap failure of GCC 11 on MinGW64 configured with --enable- tune=nocona. The bottom line is that SEH does not support CFI for epilogues but the x86 back-end nevertheless attaches it to instructions, so we have to filter it out and this is done by detecting the end of the prologue by means of the NOTE_INSN_PROLOGUE_END note. But the compiler manages to generate a second epilogue before this note in the RTL stream and this fools the aforementioned logic. The root cause is cross-jumping, which inserts a jump before the end of the prologue, in fact just before the note; the rest (CFG cleanup, BB reordering, etc) is downhill from there. gcc/ PR rtl-optimization/100411 * cfgcleanup.c (try_crossjump_to_edge): Also skip end of prologue and beginning of function markers.
-
Jeff Law authored
gcc * config/cr16/cr16.h (NOTICE_UPDATE_CC): Remove. * config/cr16/cr16.c (notice_update_cc): Remove. * config/cr16/cr16-protos.h (notice_update_cc): Remove.
-
Harald Anlauf authored
When the check for the length of formal and actual character arguments found a mismatch and emitted a warning, it would skip further checks like that could lead to errors. Fix that by continuing the checking. Also catch a NULL pointer dereference. gcc/fortran/ChangeLog: PR fortran/100274 * interface.c (gfc_compare_actual_formal): Continue checks after emitting warning for argument length mismatch. * trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer dereference. gcc/testsuite/ChangeLog: PR fortran/100274 * gfortran.dg/argument_checking_25.f90: New test.
-
Uros Bizjak authored
Implement integer vector compares for 64bit vectors for TARGET_MMX_WITH_SSE. 2021-05-05 Uroš Bizjak <ubizjak@gmail.com> gcc/ PR target/98218 * config/i386/i386-expand.c (ix86_expand_int_sse_cmp): Handle V8QI, V4HI and V2SI modes. * config/i386/i386.c (ix86_build_const_vector): Handle V2SImode. (ix86_build_signbit_mask): Ditto. * config/i386/mmx.md (MMXMODE14): New mode iterator. (<smaxmin:code><MMXMODE14:mode>3): New expander. (*mmx_<smaxmin:code><MMXMODE14:mode>3): New insn pattern. (<umaxmin:code><MMXMODE24:mode>3): New expander. (*mmx_<umaxmin:code><MMXMODE24:mode>3): New insn pattern. (vec_cmp<MMXMODEI:mode><MMXMODEI:mode>): New expander. (vec_cmpu<MMXMODEI:mode><MMXMODEI:mode>): Ditto. (vcond<MMXMODEI:mode><MMXMODEI:mode>): Ditto. (vcondu<MMXMODEI:mode><MMXMODEI:mode>): Ditto. (vcond_mask_<MMXMODEI:mode><MMXMODEI:mode>): Ditto. gcc/testsuite/ PR target/98218 * gcc.target/i386/pr98218-1.c: New test. * gcc.target/i386/pr98218-1a.c: Ditto. * gcc.target/i386/pr98218-2.c: Ditto. * gcc.target/i386/pr98218-2a.c: Ditto. * gcc.target/i386/pr98218-3.c: Ditto. * gcc.target/i386/pr98218-3a.c: Ditto. * gcc.dg/vect/vect-bool-cmp.c (dg-final): Scan vect tree dump for "LOOP VECTORIZED", not VECTORIZED.
-
Jonathan Wakely authored
libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/invoke/3.cc: Check feature test macro. * testsuite/20_util/function_objects/invoke/version.cc: New test.
-
Jonathan Wakely authored
Passing plain char to isdigit is undefined if the value is negative. libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_alnum): Pass unsigned char to std::isdigit.
-
Eric Botcazou authored
gcc/testsuite/ * gnat.dg/debug17.adb: Minor tweak.
-
Eric Botcazou authored
In Ada you can embed VLAs in local record types and thus end up with dynamic offsets in record types, which are not well described in DWARF because 1) the temporaries generated for them by the gimplifier are naturally marked DECL_IGNORED_P and 2) when the types are referenced in nested subprograms, the DWARF back-end does not correctly handle the rewritten references. gcc/ * dwarf2out.c (loc_list_from_tree_1) <DECL>: During early DWARF, do not expand the VALUE_EXPR of variables put in the non-local frame. * gimplify.c (gimplify_type_sizes) <RECORD_TYPE>: If the type is not to be ignored for debug info, ensure its variable offsets are not. gcc/testsuite/ * gnat.dg/debug8.adb: Minor tweak. * gnat.dg/debug11.adb: Likewise. * gnat.dg/debug16.adb: Likewise. * gnat.dg/debug17.adb: New test. * gnat.dg/specs/debug1.ads: Minor tweak.
-
Tobias Burnus authored
libgfortran/ChangeLog: * intrinsics/chmod.c (chmod_internal): Only declare mode_mask var if HAVE_UMASK.
-
Robin Dapp authored
On s390 we vectorize 4 statements using SLP. Add s390*-*-* to the appropriate dg-finals. gcc/testsuite/ChangeLog: * gcc.dg/vect/slp-21.c: Add s390.
-
Piotr Trojanek authored
gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Fix expansion of attributes Input and Output for unchecked unions. * sem_case.ads: Fix typo "disriminant" and refill comment.
-
Piotr Trojanek authored
gcc/ada/ * exp_attr.adb, exp_ch9.adb, sem_ch3.adb: Reuse Has_Defaulted_Discriminants. * sem_ch4.adb (Analyze_Allocator): Reuse Has_Defaulted_Discriminants (after reordering conjuncts); remove redundant IF statement, whose condition is implied by Has_Defaulted_Discriminants. * sem_util.adb (Has_Defaulted_Discriminants): Has_Discriminants implies that the First_Discriminant is present. (Is_Fully_Initialized_Type): Reuse Has_Defaulted_Discriminants.
-
Justin Squirek authored
gcc/ada/ * exp_ch6.adb (Expand_Call_Helper): Add condition to check for expanded actuals and remove dead code.
-
Piotr Trojanek authored
gcc/ada/ * exp_ch4.adb (Has_Unconstrained_UU_Component): Rewrite to follow the Ada RM grammar.
-
Piotr Trojanek authored
gcc/ada/ * exp_ch4.adb (User_Defined_Primitive_Equality_Op): Refine type of a local variable. * exp_dbug.adb (Scope_Contains): Refine all types from Node_Id to Entity_Id; rename parameters to match those of the Scope_Within routine (which is similar but not the same); also, simplify an OR ELSE into a membership test.
-
Piotr Trojanek authored
gcc/ada/ * exp_ch4.adb (Component_Is_Unconstrained_UU): Detect both qualified and unqualified names of unchecked union components.
-
Piotr Trojanek authored
gcc/ada/ * exp_ch4.adb (Variant_Is_Unconstrained_UU): Remove redundant check for empty list. * exp_disp.adb (Find_Entry_Index): Simplify by removing redundant check and counting from zero; fix type of a local variable. * sem_ch12.adb (Save_Global_Descendant): Remove an unnecessary special-case for empty lists.
-
Piotr Trojanek authored
gcc/ada/ * exp_ch4.adb (Apply_Accessibility_Check): Skip a statically true condition in expanded raise statement.
-
Bob Duff authored
gcc/ada/ * libgnat/s-os_lib.adb (Missed_Drive_Letter): Simplify the code.
-
Ed Schonberg authored
gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Do not emit the warning that a previous value of the target object is useless if the right-hand side of the assignment includes target names.
-
Eric Botcazou authored
gcc/ada/ * exp_imgv.adb: Add with/use clauses for Targparm. (Build_Enumeration_Image_Tables): Set type of Threshold to Nat and initialize it to Nat'Last if the type is local and the target does not support descriptors. Adjust Threshold_For_Size similarly. (Expand_Value_Attribute): Minor tweaks.
-
Ghjuvan Lacambre authored
gcc/ada/ * exp_ch7.adb (Expand_N_Package_Body): Add CUDA init call. * sem_ch7.adb (Analyze_Package_Body_Helper): Remove CUDA init call.
-
Ghjuvan Lacambre authored
gcc/ada/ * par-ch5.adb (P_Condition): Check if expression is declare expression.
-
Piotr Trojanek authored
gcc/ada/ * make.adb (Make): Use GNAT.Ctrl_C.Install_Handler instead of a custom imported procedure.
-
Eric Botcazou authored
gcc/ada/ * exp_imgv.adb (Is_User_Defined_Enumeration_Type): Delete. (Expand_Image_Attribute): Move inline expansion into normal flow of control, move down declarations and remove superfluous processing.
-
Piotr Trojanek authored
gcc/ada/ * libgnat/g-alleve.adb (Bit_Operation): Now a not-null type. * libgnat/g-sechas.adb (Fill_Buffer_Access): Likewise. * libgnat/s-dwalin.adb (Callback): Likewise.
-
Ghjuvan Lacambre authored
gcc/ada/ * exp_util.adb (Is_Possibly_Unaligned_Object): Remove commented code.
-
Ed Schonberg authored
gcc/ada/ * sem_ch3.adb (Find_Type_Of_Object): When In_Spec_Expression is set and the object declaration generates a subtype indication, build the corresponding subtype declaration and place it in tree without the use of Insert_Actions, which is disabled in this context.
-
Eric Botcazou authored
gcc/ada/ * debug.adb (d_x): Document extended usage. * exp_imgv.adb (Expand_Standard_Boolean_Image): New procedure. (Expand_Image_Attribute): Call it to expand in line the attribute for standard boolean by default.
-
Eric Botcazou authored
gcc/ada/ * debug.adb (d_x): Document new usage. * exp_imgv.adb (Expand_User_Defined_Enumeration_Image): Add Typ parameter and use it throughout the processing. (Expand_Image_Attribute): Retrieve the underlying type of the prefix and use the inline expansion for user-defined enumeration types with a literal string by default.
-
Eric Botcazou authored
gcc/ada/ * libgnat/s-dorepr.adb (Split): Declare a per-size temporary. Add pragma Annotate.
-