[PATCH] Fix artificial overflow during GENERIC folding

2023-05-24 Thread Eric Botcazou via Gcc-patches
s INTEGER_CSTs to the other, direct path without the intermediate conversion to the unsigned type. Tested on x86-64/Linux, OK for the mainline? 2023-05-24 Eric Botcazou * match.pd ((T)P - (T)(P + A) -> -(T) A): Avoid artificial overflow on constants. 2023-05-24

Re: [PATCH] Fix handling of non-integral bit-fields in native_encode_initializer

2023-05-23 Thread Eric Botcazou via Gcc-patches
ut these non-integral bit-fields (output_constructor et al) so we could even try to share some code. However, in practice, these cases turn out to be rare because the tree_output_constant_def path in gimplify_init_constructor is well guarded. -- Eric Botcazou

[PATCH] Fix handling of non-integral bit-fields in native_encode_initializer

2023-05-22 Thread Eric Botcazou via Gcc-patches
on a byte boundary because they are correctly handled in this case. Bootstrapped/regtested on x86-64/Linux, OK for mainline and 13 branch? 2023-05-22 Eric Botcazou * fold-const.cc (native_encode_initializer) : Apply the specific treatment for bit-fields only if they have

Re: [PATCH] Fix internal error on small array with negative lower bound

2023-05-18 Thread Eric Botcazou via Gcc-patches
_index) + 1); or store_constructor this_node_count = (tree_to_uhwi (hi_index) - tree_to_uhwi (lo_index) + 1); so the proposed form looks better for the sake of consistency. -- Eric Botcazou

[PATCH] Fix internal error on small array with negative lower bound

2023-05-18 Thread Eric Botcazou via Gcc-patches
in output_constructor_bitfield. Tested on x86-64/Linux, OK for the mainline? 2023-05-18 Eric Botcazou * varasm.cc (output_constructor_bitfield): Call tree_to_uhwi instead of tree_to_shwi on array indices. Minor tweaks. 2023-05-18 Eric Botcazou * gnat.dg/specs/array6.ads: New

Re: [PATCH 01/14] ada: use _P() defines from tree.h

2023-05-15 Thread Eric Botcazou via Gcc-patches
); >const bool had_align = TYPE_ALIGN (record_type) > 0; >/* For all-repped records with a size specified, lay the QUAL_UNION_TYPE > out just like a UNION_TYPE, since the size will be fixed. */ This one is not an improvement but more of a coincidence; the rest is OK. -- Eric Botcazou

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-13 Thread Eric Botcazou via Gcc-patches
ined arrays, and I'm testing a patch to that effect, but the first issue might be annoying too. -- Eric Botcazou

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-09 Thread Eric Botcazou via Gcc-patches
need to wait for Eric > before making progress. Let me have a quick look first, as pessimizing loop optimizations in Ada in order to fix a 11-year old PR seems to be a little bit hasty. -- Eric Botcazou

Re: Probe emission in fstack-clash-protection

2023-05-03 Thread Eric Botcazou via Gcc
64]/Linux where you *cannot* probe below the stack pointer. -- Eric Botcazou

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-26 Thread Eric Botcazou via Gcc-patches
> probably also helps PR109612 and the other similar PR referenced therein. Here's a more aggressive patch in this area, but it regresses guality tests, for example: +FAIL: gcc.dg/guality/ipa-sra-1.c -O2 -DPREVENT_OPTIMIZATION line 27 k == 3 +FAIL: gcc.dg/guality/ipa-sra-1.c -O3 -g

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
> Haven't looked into detail, but just saving compilation time shouldn't be > the only factor when deciding about debug info stuff, another and perhaps > even more important would be whether it affects the emitted debug info. At least it doesn't change the guality results. -- Eric Botcazou

[PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
/regtested on x86-64/Linux, OK for the mainline? 2023-04-25 Eric Botcazou * tree-ssa.cc (insert_debug_temp_for_var_def): Do not create superfluous debug temporaries for single GIMPLE assignments. -- Eric Botcazoudiff --git a/gcc/tree-ssa.cc b/gcc/tree-ssa.cc index a5cad2d344e

[Ada] Remove obsolete configure code in gnattools

2023-04-25 Thread Eric Botcazou via Gcc-patches
Botcazou * configure.ac (TOOLS_TARGET_PAIRS): Remove obsolete settings. (EXTRA_GNATTOOLS): Likewise. * configure: Regenerate. -- Eric Botcazou diff --git a/gnattools/configure.ac b/gnattools/configure.ac index 5b6f34ed9f4..38a28b6ee62 100644 --- a/gnattools/configure.ac +++ b

Re: [PATCH] reload: Handle generating reloads that also clobbers flags

2023-04-18 Thread Eric Botcazou via Gcc-patches
> That "supposed to" is only *one* possible implementation. > The one in CRIS - and I believe the preferred one; one I > should advocate more - is to *always* expose clobbering of > the flags. Yes, both approaches are acceptable IMO and should work. -- Eric Botcazou

Re: [Ada] Fix PR bootstrap/109510

2023-04-15 Thread Eric Botcazou via Gcc-patches
capped on selected platforms. -- Eric Botcazou diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 851a6745f77..20f43de9ea9 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -4371,10 +4371,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity

[Ada] Fix PR bootstrap/109510

2023-04-14 Thread Eric Botcazou via Gcc-patches
S. (thanks!) and on x86-64/Linux by me, and applied on the mainline. 2023-04-14 Eric Botcazou PR bootstrap/109510 * gcc-interface/decl.cc (gnat_to_gnu_entity) : Reset align to zero if its value is equal to TYPE_ALIGN and the type is scalar. Set TYPE_USER_ALIGN

Re: gcc with the new WIN32 threads fails to compile libstdc++

2023-04-10 Thread Eric Botcazou via Gcc
> I'm assuming the problem also extends to the other __gthr_win32 routines as > well, __gthr_win32_create just happens to be the first symbol it cannot > find. > > Is there a way to fix this issue? How did you configure the compiler and what version of MinGW64 do you use? -- Eric Botcazou

Re: [PATCH] combine: Fix simplify_comparison AND handling for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
er code for > WORD_REGISTER_OPERATIONS and sub-word modes which will call nonzero_bits > again for the word mode and decide if it is still safe. Does it work to just replace mode by word_mode in the calls to nonzero_bits? > That patch doesn't change anything at all on the testcase, it is still > miscompiled. OK, too bad, thanks for trying it! -- Eric Botcazou

Re: [PATCH] combine: Fix simplify_comparison AND handling for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
> If we want to fix it in the combiner, I think the fix would be following. > The optimization is about > (and:SI (subreg:SI (reg:HI xxx) 0) (const_int 0x84c)) > and IMHO we can only optimize it into > (subreg:SI (and:HI (reg:HI xxx) (const_int 0x84c)) 0) > if we know that the upper bits of the

Re: [PATCH] dse: Handle SUBREGs of word REGs differently for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
setter. That then records among other things nonzero_bits as 0x8084c." That's a recent addition of mine (ae20d760b1ed69f631c3bf9351bf7e5005d52297) and I think that it probably abuses WORD_REGISTER_OPERATIONS and should either be reverted or restricted to the load case documented in its comment. I can provide testing on SPARC if need be. -- Eric Botcazou

[SPARC] Fix PR target/109140

2023-03-28 Thread Eric Botcazou via Gcc-patches
Eric Botcazou PR target/109140 * config/sparc/sparc.cc (sparc_expand_vcond): Call signed_condition on operand #3 to get the final condition code. Use std::swap. * config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander. (fucmp8_vis): Move around

Re: [PATCH] Modula-2: fix documentation layout

2023-03-27 Thread Eric Botcazou via Gcc-patches
Hi Gaius, > yes indeed and thanks for the patch! You're welcome. The documentation was slightly broken again in the meantime, but nothing really serious this time. Again tested with a modern and an old version of Makeinfo. OK for mainline? 2023-03-27 Eric Botcazou * doc/

(testsuite] Skip gnat.dg/div_zero.adb on Aarch64

2023-03-23 Thread Eric Botcazou via Gcc-patches
For the same reason as on PowerPC. Tested on Aarch64/Linux, applied on the mainline and 12 branch. 2023-03-23 Eric Botcazou * gnat.dg/div_zero.adb: Skip for aarch64*-*-* targets. -- Eric Botcazoudiff --git a/gcc/testsuite/gnat.dg/div_zero.adb b/gcc/testsuite/gnat.dg/div_zero.adb

Re: [PATCH] Fix PR target/90458

2023-02-17 Thread Eric Botcazou via Gcc-patches
> Is there a way to say that the test results should be inverted on a > particular platform (instead of purely unsupported)? Yes, you can do pretty much what you want with the testsuite harness. -- Eric Botcazou

Re: [PATCH] Fix PR target/90458

2023-02-16 Thread Eric Botcazou via Gcc-patches
> This fixes dg.exp/stack-check-2.c, -7, 8, and -16.c, which is great! Try the attached patch. -- Eric Botcazoudiff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 227e3004077..d4f036a3f1e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++

[PATCH] Fix PR target/90458

2023-02-15 Thread Eric Botcazou via Gcc-patches
branches? 2023-02-15 Eric Botcazou * config/i386/i386.cc (ix86_compute_frame_layout): Disable the effects of -fstack-clash-protection for TARGET_STACK_PROBE. (ix86_expand_prologue): Likewise. -- Eric Botcazoudiff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386

[PATCH] Fix small regression in Ada

2023-02-14 Thread Eric Botcazou via Gcc-patches
It is present on the mainline and 12 branch and comes from Andrew P. and me forgetting about the VOID_TYPE_P case of SAVE_EXPRs. Tested on x86-64/Linux, applied on mainline and 12 branch as obvious. 2023-02-14 Eric Botcazou gcc/ * gimplify.cc (gimplify_save_expr): Add missing guard

Re: POWER __builtin_add_overflow/__builtin_mul_overflow with u64

2023-02-14 Thread Eric Botcazou via Gcc
> rs6000 indeed doesn't implement {,u}{add,sub,mul}v4_optab for > any mode and thus leaves it to the generic code. https://gcc.gnu.org/pipermail/gcc-patches/2016-October/460209.html -- Eric Botcazou

Re: [PATCH] don't declare header-defined functions both static and inline

2023-01-31 Thread Eric Botcazou via Gcc-patches
but we should tell them >about it Removing all the above "static" is OK. -- Eric Botcazou

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-27 Thread Eric Botcazou via Gcc-patches
> OK. PLACEHOLDER_EXPR are only relevant pre simplification. I presume you mean "pre gimplification" here? -- Eric Botcazou

Re: [PATCH 7/9] sparc: Don't add crtfastmath.o for -shared

2023-01-23 Thread Eric Botcazou
DFILE_SPEC): Likewise. > * config/sparc/linux64.h (ENDFILE_SPEC): Likewise. > * config/sparc/sp-elf.h (ENDFILE_SPEC): Likewise. > * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise. OK, thanks. -- Eric Botcazou

[c-family] Small fix for -fdump-ada-spec

2023-01-13 Thread Eric Botcazou via Gcc-patches
This is needed to support the _Float32 and _Float64 types. Tested on x86-64/Linux, applied on the mainline. 2023-01-13 Eric Botcazou c-family/ * c-ada-spec.cc (is_float32): New function. (is_float64): Likewise. (is_float128): Tweak. (dump_ada_node) : Call

[PATCH] Fix PR rtl-optimization/108274

2023-01-13 Thread Eric Botcazou via Gcc-patches
Hi, unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. Tested on x86-64/Linux, OK for mainline? 2023-01-13 Eric

[PATCH] Fix PR tree-optimization/108199

2023-01-11 Thread Eric Botcazou via Gcc-patches
Hi, this fixes the problematic interaction between bitfields, unions, SSO and SRA. Tested on x86-64/Linux and SPARC/Solaris, OK for all active branches? 2023-01-11 Eric Botcazou Andreas Krebbel PR tree-optimization/108199 * tree-sra.cc (sra_modify_expr): Deal

[PATCH] Modula-2: fix documentation layout

2023-01-09 Thread Eric Botcazou via Gcc-patches
allows me to build it with these older versions, as well as with modern versions. OK for mainline? 2023-01-09 Eric Botcazou * doc/gm2.texi (Overview): Fix @node markers. (Using): Likewise. Remove subsections that were moved to Overview from the menu and move others around

Re: Adding a new thread model to GCC

2023-01-09 Thread Eric Botcazou via Gcc-patches
> fixed now. > bootstrapped successfully! Thanks for fixing it. Another way out is to hide the Win32 API by defining __GTHREAD_HIDE_WIN32API like libstdc++ does in its header files. -- Eric Botcazou

Re: Adding a new thread model to GCC

2022-12-16 Thread Eric Botcazou via Gcc-patches
ouldn't be very much use without the libgcc > changes. Sure thing. -- Eric Botcazou

Re: Possible regression in DF analysis

2022-12-13 Thread Eric Botcazou via Gcc
over the basic block containing insn 14 and 15? -- Eric Botcazou

Re: Possible regression in DF analysis

2022-12-08 Thread Eric Botcazou via Gcc
:DI 34) > (pc))) "bad_cc.c":12:10 15 {condjump} > (expr_list:REG_DEAD (reg:CC 66 cc) > (int_list:REG_BR_PROB 365072228 (nil))) > -> 34) > > Please observe the REG_DEAD note on the both jump instructions. Passes that consume REG_DEAD/REG_UNUSED notes need to recompute them explicitly, they are not updated on the fly. -- Eric Botcazou

Fix PR ada/107810

2022-11-29 Thread Eric Botcazou via Gcc-patches
This just makes the pattern matching more robust. Tested on SPARC64/Solaris and x86-64/Linux, applied on the mainline. 2022-11-29 Eric Botcazou PR ada/107810 * gnat.dg/unchecked_convert9.adb: Adjust pattern. -- Eric Botcazoudiff --git a/gcc/testsuite/gnat.dg

[PATCH] Fix thinko in operator_bitwise_xor::op1_range

2022-11-25 Thread Eric Botcazou via Gcc-patches
Botcazou * range-op.cc (operator_bitwise_xor::op1_range): Fix thinko. 2022-11-25 Eric Botcazou * gnat.dg/opt100.adb: New test. * gnat.dg/opt100_pkg.adb, gnat.dg/opt100_pkg.ads: New helper. -- Eric Botcazoudiff --git a/gcc/range-op.cc b/gcc/range-op.cc index 6fa3b151596

[PATCH] Fix wrong array type conversion with different storage order

2022-11-22 Thread Eric Botcazou via Gcc-patches
a memcpy/memmove in this case. Tested on x86-64/Linux, OK for the mainline? 2022-11-22 Eric Botcazou * tree-loop-distribution.cc (loop_distribution::classify_builtin_ldst): Bail out if source and destination do not have the same storage order. 2022-11-22 Eric Botcazou

Re: [PATCH] ARM: Make ARMv8-M attribute cmse_nonsecure_call work in Ada

2022-11-21 Thread Eric Botcazou via Gcc-patches
> Ok if no regressions, perhaps the test needs to be in the ada test suite ? Thanks. Sure, testcase added to gnat.dg like so: * gnat.dg/machine_attr2.ads, gnat.dg/machine_attr2.adb: New test. -- Eric Botcazoupackage Machine_Attr2 is type Non_Secure is access procedure; pragma

Re: [PATCH] Restore RTL alias analysis for hard frame pointer

2022-11-09 Thread Eric Botcazou via Gcc-patches
a-1.c -O2 -flto -fno-use-linker-plugin -flto- partition=none -DPREVENT_OPTIMIZATION line 24 i == 5 present on the gcc-12 branch wrt the gcc-11 branch (apparently nobody really cares about the guality testsuite on x86/Linux). * gcc.dg/guality/param-6.c: New test. -- Eric Botcazou/* {

Re: [PATCH] rtl: Try to remove EH edges after {pro, epi}logue generation [PR90259]

2022-11-08 Thread Eric Botcazou via Gcc-patches
nstalled, do you > think testing Ada on ppc64le is enough? Sure, thanks for having done it! -- Eric Botcazou

Re: [PATCH] rtl: Try to remove EH edges after {pro, epi}logue generation [PR90259]

2022-11-08 Thread Eric Botcazou via Gcc-patches
> It looks reasonable - OK if the others CCed have no comments. My only comment is that it needs to be tested with languages enabling -fnon- call-exceptions by default (Ada & Go), if not already done. -- Eric Botcazou

Re: [PATCH] maintainer-scripts/gcc_release: compress xz in parallel

2022-11-07 Thread Eric Botcazou via Gcc-patches
>I build GCC regularly from the weekly snapshots >and so the decompression time adds up. But is very largely dwarfed by the build time of the compiler, isn't it? -- Eric Botcazou

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-07 Thread Eric Botcazou via Gcc-patches
> Eric, can you push the approved fix for this issue (look for a message > from Richard P day or two back, approved by Richi)? I'm dealing with a > medical issue and heading offline again momentarily. Sure, done. -- Eric Botcazou

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Eric Botcazou via Gcc-patches
ple_opt_pass > { > public: > > @@ -4204,14 +4205,17 @@ public: > : gimple_opt_pass (pass_data_fold_builtins, ctxt) > >{} > > + bool gate (function *) final override { return O0 == !optimize; } O0 as suffix is fine, but please avoid using it as a standalone identifier. -- Eric Botcazou

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-07 Thread Eric Botcazou via Gcc-patches
t we have to live with it now. -- Eric Botcazou

[PATCH] Fix recent thinko in operand_equal_p

2022-11-04 Thread Eric Botcazou via Gcc-patches
ing. Tested on x86-64/Linux, OK for mainline, 12 and 11 branches? 2022-11-04 Eric Botcazou * fold-const.cc (operand_compare::operand_equal_p) : Do not take into account operand 2. (operand_compare::hash_operand) : Likewise. 2022-11-04 Eric Botcazou * gnat

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-04 Thread Eric Botcazou via Gcc-patches
ry access -- Eric Botcazou

Re: c: tree: target: C2x (...) function prototypes and va_start relaxation

2022-11-04 Thread Eric Botcazou via Gcc-patches
o-fat-lto-objects execution test The implementation does not work on some targets, see PR target/107453. -- Eric Botcazou

Re: Adding a new thread model to GCC

2022-11-02 Thread Eric Botcazou via Gcc-patches
er with the option --enable-libstdcxx-threads. -- Eric Botcazou#include #include #include #include #include #define NUM_THREADS 4 std::condition_variable cond; std::mutex mx; int started = 0; void do_thread () { std::unique_lock lock(mx); std::cout << "Start thread " <&

Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-11-01 Thread Eric Botcazou via Gcc-patches
rick used in the SPARC back-end, but unsigned overflow is much easier to deal with than signed overflow. -- Eric Botcazou

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2022-11-01 Thread Eric Botcazou via Gcc-patches
> Do those loads still get scalarized at -O0? Presumably not at the GIMPLE level, but possibly at the RTL level. -- Eric Botcazou

Re: Adding a new thread model to GCC

2022-11-01 Thread Eric Botcazou via Gcc-patches
of some test. > > why did I faced with this error? what should I do to avoid this? Run autoheader + autoconf in the libstdc++-v3 source repository. -- Eric Botcazou

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2022-10-31 Thread Eric Botcazou via Gcc-patches
> I suppose we could use memcmp on the as variable itself, to inspect > the actual stored padding rather than the returned copy of it. Yes, that's probably the only safe stance when optimization is enabled. -- Eric Botcazou

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2022-10-31 Thread Eric Botcazou via Gcc-patches
_buf].c; __buf$s_35 = MEM[(struct S *)&__buf].s; __buf ={v} {CLOBBER(eol)}; es.c = __buf$c_100; es.s = __buf$s_35; _66 = MEM [(char * {ref-all})]; _101 = MEM [(char * {ref-all})]; if (_66 != _101) goto ; [0.04%] else goto ; [99.96%] so the result of the 4-byte compar

Re: Adding a new thread model to GCC

2022-10-31 Thread Eric Botcazou via Gcc-patches
n32-winnt=0x0600 to get the same effect). I only manually tested it on i686-w64-mingw32 and x86_64-w64-mingw32 but AdaCore has used it in their C/C++/Ada compilers for 3 years now and the 30_threads chapter of the libstdc++ testsuite was clean at the time. 2022-10-31 Eric Botcazou

Re: GCC trunk bootstrap failure on i686-w64-mingw32

2022-10-29 Thread Eric Botcazou via Gcc
> So what could be causing it? An oversight in https://gcc.gnu.org/pipermail/gcc-cvs/2022-August/370830.html has broken --disable-sjlj-exceptions. That's now fixed. -- Eric Botcazou

Repair --disable-sjlj-exceptions

2022-10-29 Thread Eric Botcazou via Gcc-patches
-hpux10.opt: Removed. * config/pa/t-dce-thr: Removed. Tested by building i686-w64-mingw32 with --disable-sjlj-exceptions, applied on the mainline as obvious. 2022-10-29 Eric Botcazou * configure.ac (sjlj-exceptions): Restore dropped line. * configure: Regenerate. -- Eric

Re: [PATCH] Restore RTL alias analysis for hard frame pointer

2022-10-29 Thread Eric Botcazou via Gcc-patches
> OK for trunk and 12 after a while of burn-in. Thanks! > Oh, do you have a testcase suitable for the testsuite? I only have an Ada testcase for GDB, let me try to find something more usable. -- Eric Botcazou

Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-10-28 Thread Eric Botcazou via Gcc-patches
> You mean in CCV? That works yes, but only because (or if) the setter > and getter of the CC reg both use CCV (so never use any other flag at > the same time; CCV has an empty intersection with all other CC modes). We're talking about CCC here AFAIK, i.e. the carry, not CCV. -- Eric Botcazou

Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-10-28 Thread Eric Botcazou via Gcc-patches
> COMPARE may also set CC register to a constant when both operands are > known constants. No, a COMPARE is never evaluated alone, only the CC user may be evaluated. -- Eric Botcazou

Re: RFC - VRP1 default mode

2022-10-28 Thread Eric Botcazou via Gcc-patches
r? Part of rangers > point is to be able to do symbolic relationships without storing the > symbolic in the range, just picking it up from the IL as needed. The motivating Ada example for symbolic ranges was gnat.dg/opt40.adb. -- Eric Botcazou

[PATCH] Restore RTL alias analysis for hard frame pointer

2022-10-28 Thread Eric Botcazou via Gcc-patches
/regtested on x86-64/Linux, OK for mainline and 12 branch? 2022-10-28 Eric Botcazou * alias.cc (init_alias_analysis): Do not record sets to the hard frame pointer if the frame pointer has not been eliminated. -- Eric Botcazoudiff --git a/gcc/alias.cc b/gcc/alias.cc index d54feb15268

Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-10-28 Thread Eric Botcazou via Gcc-patches
;unsigned less than" in x86 backend. That's not specific to the x86 back-end, i.e. it's a generic caveat. > PR target/107172 > * config/i386/i386.md (UNSPEC_CC_NE): New. > Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns. FWIW the SPARC back-end uses a COMPARE instead of an UNSPEC here. -- Eric Botcazou

[PATCH] Aarch64: Do not define DONT_USE_BUILTIN_SETJMP

2022-10-24 Thread Eric Botcazou via Gcc-patches
Hi, we have been using an Ada compiler for the Aarch64 architecture configured with SJLJ exceptions as for the other architectures for some time, and have not run into any problems so far so the setting looks obsolete now. OK for the mainline? 2022-10-24 Eric Botcazou * config

[PATCH] ARM: Make ARMv8-M attribute cmse_nonsecure_call work in Ada

2022-10-24 Thread Eric Botcazou via Gcc-patches
2022-10-24 Eric Botcazou * config/arm/arm.cc (arm_attribute_table) : Change decl_required field to false. (arm_handle_cmse_nonsecure_call): Deal with a TYPE node. -- Eric Botcazoudiff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index ee8f1babf8a..fc96ed9c

Re: vect: Make vect_check_gather_scatter reject offsets that aren't multiples of BITS_PER_UNIT [PR107346]

2022-10-24 Thread Eric Botcazou via Gcc-patches
It sets the flag when the alignment or size of the field does not match that of its type, which indeed means that it needs to be accessed specially. -- Eric Botcazou

[PATCH] Relax assertion in profile.cc

2022-10-24 Thread Eric Botcazou via Gcc-patches
bug/101598 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the DECL_SOURCE_LOCATION of DECL_IGNORED_P gnu_subprog_decl to UNKNOWN_LOCATION. was installed. Tested on x86-64/Linux, OK for mainline and 12 branch? 2022-10-24 Eric Botcazou * profile.cc (branch_p

Re: Adding a new thread model to GCC

2022-10-24 Thread Eric Botcazou via Gcc-patches
ritten implementation is the one used by the C/C++/Ada compilers from AdaCore. -- Eric Botcazou

Re: Adding a new thread model to GCC

2022-10-21 Thread Eric Botcazou via Gcc-patches
etween GCC and Windows. -- Eric Botcazou

[SPARC] Fix PR target/107248

2022-10-14 Thread Eric Botcazou via Gcc-patches
Eric Botcazou PR target/107248 * config/sparc/sparc.cc (sparc_expand_prologue): Emit a frame blockage for leaf functions. (sparc_flat_expand_prologue): Emit frame instead of full blockage. (sparc_expand_epilogue): Emit a frame blockage for leaf functions

Re: [PATCH] Fix bogus -Wstringop-overflow warning

2022-10-13 Thread Eric Botcazou via Gcc-patches
ttribute, leaving "access" strictly impacting diagnostics. I can expand a bit here, because I tried to change the "access" attribute that way and this badly breaks the C compiler, for example: int foo (int n, char m[1][n]); int foo (int n, char m[1][n]) {} no longer compiles

[PATCH] Fix bogus -Wstringop-overflow warning

2022-10-13 Thread Eric Botcazou via Gcc-patches
cess" attribute does not affect type identity (struct attribute_spec.affects_type_identity). Hence the proposed fix, tested on x86-64/Linux, OK for the mainline? 2022-10-13 Eric Botcazou * gimple-ssa-warn-access.cc (pass_waccess::check_call): Return early for calls made fr

Re: [PATCH] machmode: Introduce GET_MODE_NEXT_MODE with previous GET_MODE_WIDER_MODE meaning, add new GET_MODE_WIDER_MODE

2022-10-12 Thread Eric Botcazou via Gcc-patches
tever triggered > during the bootstraps). > > Thoughts on this? Can't we declare that one is wider than the other, for example BFmode since it has got a larger range? Though I guess this would mean special-casing them in genmodes.cc as they are presumably strictly identical except for the format. -- Eric Botcazou

Re: [RFC] Teach vectorizer to deal with bitfield reads

2022-10-12 Thread Eric Botcazou via Gcc-patches
nt.h:2232 | | Error detected around loop_optimization23_pkg.adb:5:3| | Compiling loop_optimization23_pkg.adb -- Eric Botcazou

[PATCH] Fix emit_group_store regression on big-endian

2022-10-11 Thread Eric Botcazou via Gcc-patches
cute FAIL: tmpdir-gcc.dg-struct-layout-1/t027 c_compat_x_tst.o-c_compat_y_tst.o execute Tested on SPARC64/Linux, OK for the mainline? 2022-10-11 Eric Botcazou * expr.cc (emit_group_stote): Fix handling of modes of different sizes for big-endian targets in latest change and add

[Ada] Enable support for atomic primitives on SPARC/Linux

2022-10-11 Thread Eric Botcazou via Gcc-patches
on the mainline. 2022-10-11 Eric Botcazou * libgnat/system-linux-sparc.ads (Support_Atomic_Primitives): New constant set to True. -- Eric Botcazoudiff --git a/gcc/ada/libgnat/system-linux-sparc.ads b/gcc/ada/libgnat/system-linux-sparc.ads index cc502da3e5b..6d4ee380b2d 100644

[PATCH] Reduce DF computation at -O0

2022-10-06 Thread Eric Botcazou via Gcc-patches
Hi, even at -O0 there may be a fair amount of DF computation performed when compiling large units and part of it appears to be useless. Bootstrapped/regtested on x86-64/Linux, OK for the mainline? 2022-10-06 Eric Botcazou * function.cc (thread_prologue_and_epilogue_insns): Update

Re: [PATCH] Fix wrong code generated by unroll-and-jam pass

2022-10-06 Thread Eric Botcazou via Gcc-patches
he block. Or do you mean for other dependence pairs in general? For them, I think that the code does the proper filtering in adjust_unroll_factor, but I may be wrong of course. -- Eric Botcazou

[PATCH] Fix wrong code generated by unroll-and-jam pass

2022-10-05 Thread Eric Botcazou via Gcc-patches
e iterations, which is OK for reads but not for writes. Proposed fix attached, tested on x86-64/Linux, OK for all active branches? 2022-10-05 Eric Botcazou * gimple-loop-jam.cc (tree_loop_unroll_and_jam): Bail out for a self dependency that is a write-after-write if the ac

Re: [PATCH]middle-end fix floating out of constants in conditionals

2022-09-26 Thread Eric Botcazou via Gcc-patches
> Before my change we had always done the folding *only* for TREE_CONSTANT > (arg) and my change allowed it for some cases of !TREE_CONSTANT (arg), but > I did not want to touch the !TREE_CONSTANT (arg) case at all: ...to touch the TREE_CONSTANT (arg) case at all... -- Eric Botcazou

Re: [PATCH]middle-end fix floating out of constants in conditionals

2022-09-26 Thread Eric Botcazou via Gcc-patches
arg) case at all: * fold-const.c (fold_binary_op_with_conditional_arg): Do not restrict the folding to constants. Remove redundant final conversion. Tamar's issue appears to be for TREE_CONSTANT (arg) so orthogonal to mine. -- Eric Botcazou

Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-18 Thread Eric Botcazou via Gcc-patches
Yes, that's essentially equivalent to what get_offset_range does, but I'm not sure why having two slightly different ways of doing it would be better than a single one here, Maybe replace the call to get_precision in both places with TYPE_PRECSION (type) then? -- Eric Botcazou

Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-18 Thread Eric Botcazou via Gcc-patches
it because of the POINTER_PLUS_EXPR thing, i.e. it was signed before. -- Eric Botcazou

Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-17 Thread Eric Botcazou via Gcc-patches
rng adjustment, no? (in fact I wonder why we just ignore lowbnd > if it doesn't fit or is variable...) Yes, tree_fits_uhwi_p (or tree_fits_shwi_p) is bogus here, but the test against INTEGER_CST is used everywhere else and should be good enough. -- Eric Botcazou

[PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-16 Thread Eric Botcazou via Gcc-patches
get_offset_range, which uses a signed type, and handle_array_ref, which uses an unsigned one, to do offset computations. Tested on x86-64/Linux, OK for the mainline? 2022-08-16 Eric Botcazou * pointer-query.cc (handle_array_ref): Fix handling of low bound. 2022-08-16 Eric Botcazou

Re: [PATCH 2/2] Avoid registering __builtin_setjmp_receiver label twice [PR101347]

2022-07-20 Thread Eric Botcazou via Gcc-patches
stly ignored ... This is a specific circuitry for __builtln_setjmp so it is *not* exercised by the SJLJ exception scheme. It used to be exercised by the GNAT bootstrap, but that's no longer the case either. I think that the fix is sensible, assuming that it passes the C testsuite. -- Eric Botcazou

[PATCH] Fix ICE on view conversion between struct and integer

2022-07-14 Thread Eric Botcazou via Gcc-patches
of setting the flag earlier. Bootstrapped/regtested on x86-64/Linux, OK for the mainline? 2022-07-14 Eric Botcazou * gimplify.cc (lookup_tmp_var): Add NOT_GIMPLE_REG boolean parameter and set DECL_NOT_GIMPLE_REG_P on the variable according to it. (internal_get_tm

Re: [PATCH] Use default lower bound for vector types in debug info

2022-07-04 Thread Eric Botcazou via Gcc-patches
se a default according to that? Not sure, the only safe thing to do would be to return -1 as the default lower bound if flag_generate_lto. -- Eric Botcazou

[PATCH] Use default lower bound for vector types in debug info

2022-07-04 Thread Eric Botcazou via Gcc-patches
Hi, vector types are represented as array types with DW_AT_GNU_vector attribute in the debug info and a range [0 .. TYPE_VECTOR_SUBPARTS - 1]. That's obviously skewed toward the C family of languages, therefore the attached patch changes the lower bound to the default for the language of the

[PATCH] Amend fix for PR middle-end/105874

2022-06-30 Thread Eric Botcazou via Gcc-patches
As pointed out by Richard, it's very likely too big of a hammer. Bootstrapped/regtested on x86-64/Linux, OK for the mainline? 2022-06-30 Eric Botcazou PR middle-end/105874 * expr.cc (expand_expr_real_1) : Force EXPAND_MEMORY for the expansion of the inner reference

Re: Build of any gcc breaks on my sparc / illumos env

2022-06-21 Thread Eric Botcazou
recommended combination with recent versions of the compiler, but Solaris ld must be recent enough, otherwise building for sparc-sun-solaris2.11 probably does not work indeed. -- Eric Botcazou

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-20 Thread Eric Botcazou via Gcc-patches
> aarch64-suse-linux, of course. Likewise on x86_64-suse-linux. > > What is the output of > > > > grep loff_t TARGET/libgo/gen-sysinfo.go > > type ___loff_t int64 > type _loff_t int64 > type ___kernel_loff_t int64 Ditto. -- Eric Botcazou

Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-14 Thread Eric Botcazou via Gcc-patches
> Hmm, I think instead of special-casing UNKNOWN_LOCATION > what gimple_set_location should probably do is either not copy > warnings at all or union them. Btw, gimple_set_location also > removes a previously set BLOCK (but gimple_set_block preserves > the location locus and diagnostic override).

Re: [PATCH] PR middle-end/105874: Use EXPAND_MEMORY to fix ada bootstrap.

2022-06-13 Thread Eric Botcazou via Gcc-patches
new optimization doesn't trigger rather than a > condition that will always require memory? It may indeed be too big a hammer. Roger, would it be sufficient to use EXPAND_MEMORY only when must_force_mem computed a few lines below if true? -- Eric Botcazou

Re: [PATCH] Introduce -finstrument-functions-once

2022-06-13 Thread Eric Botcazou via Gcc-patches
> So that also applies to > > "... and the second profiling function is called before the exit > +corresponding to this first entry" > > specifically "corresponding to this first entry"? As if the second > entry exits first will that call the second profiling function or will > it really be

<    1   2   3   4   5   6   7   8   9   10   >