Re: [PATCH] vect: Check that vector factor is a compile-time constant

2023-03-01 Thread Richard Biener via Gcc-patches
On Wed, Mar 1, 2023 at 10:00 PM Michael Collison wrote: > > Okay there seems to be consensus on using constant_lower_bound (vf), but > I don't understand how that is a replacement for "vf.is_constant ()"? In > one case we are checking if "vf" is a constant, on the other we are > asking for the

[Bug tree-optimization/107561] [13 Regression] g++.dg/pr71488.C and [g++.dg/warn/Warray-bounds-16.C -m32] regression due to -Wstringop-overflow problem

2023-03-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107561 --- Comment #22 from Richard Biener --- (In reply to Jonathan Wakely from comment #20) > (In reply to Jakub Jelinek from comment #16) > > (In reply to Richard Biener from comment #15) > > > where if I understand you correctly, bar () is not

[Bug tree-optimization/107561] [13 Regression] g++.dg/pr71488.C and [g++.dg/warn/Warray-bounds-16.C -m32] regression due to -Wstringop-overflow problem

2023-03-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107561 --- Comment #21 from Richard Biener --- (In reply to Jakub Jelinek from comment #19) > And on > void bar (void); > struct X { > X (int); > int i; > int j; > void baz (int); > }; > > X::X(int k) > { > i = k; > bar (); > j = i !=

Re: [PATCH] debug/108772 - ICE with late debug generated with -flto

2023-03-01 Thread Richard Biener via Gcc-patches
On Wed, 1 Mar 2023, Jason Merrill wrote: > On 3/1/23 08:09, Jakub Jelinek wrote: > > On Wed, Mar 01, 2023 at 01:07:02PM +, Richard Biener wrote: > >> When combining -g1 with -flto we run into the DIE location annotation > >> machinery for globals calling dwarf2out_late_global_decl but not >

[pushed] wwwdocs: testing: Avoid a duplicate link

2023-03-01 Thread Gerald Pfeifer
This came up in a conversation with Jan. (We already have a link a bit earlier on that page.) Pushed. Gerald --- htdocs/testing/index.html | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/testing/index.html b/htdocs/testing/index.html index bd6219ab..012ac287

[Bug target/106770] powerpc64le: Unnecessary xxpermdi before mfvsrd

2023-03-01 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106770 --- Comment #9 from Surya Kumari Jangala --- RTL after dfinit pass for the vec_sub() and the vec_extract(): (insn 13 12 14 2 (set (reg:V2DI 132 [ vrD.3952 ]) (minus:V2DI (subreg:V2DI (reg:V2DF 117 [ _1 ]) 0) (subreg:V2DI

Re: [PATCH] libiberty: fix memory leak in pex-win32.c and refactor

2023-03-01 Thread Richard Biener via Gcc-patches
On Wed, Mar 1, 2023 at 7:14 PM Costas Argyris via Gcc-patches wrote: > > Hi > > It seems that the win32_spawn function in libiberty/pex-win32.c is leaking > the cmdline buffer in 2/3 exit scenarios (it is only free'd in 1/3).The > problem here is that the cleanup code is written 3 times, one

[Bug target/108984] [13 Regression] LTO bootstrap causes testsuite ICE

2023-03-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108984 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/106770] powerpc64le: Unnecessary xxpermdi before mfvsrd

2023-03-01 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106770 --- Comment #8 from Surya Kumari Jangala --- While the first two xxpermdi's are fine, the 3rd one is a bug. It is incorrect. Here is the C code inlined into assembly: _Z4cmp2dd: .LFB1: .cfi_startproc // vector double va =

RE: Re: [PATCH] RISC-V: Bugfix for rvv bool mode precision adjustment

2023-03-01 Thread Li, Pan2 via Gcc-patches
Thanks all for help. I tried and validated the way Richard mentioned, it works well as expected. Meanwhile, I updated the PR as below (I take the in-reply-to option for send-email but looks failed). Could you please help to review continuously? Additionally, I would like to learn if we can land

[PATCH v2] RISC-V: Bugfix for rvv bool mode precision adjustment

2023-03-01 Thread pan2.li--- via Gcc-patches
From: Pan Li Fix the bug of the rvv bool mode precision with the adjustment. The bits size of vbool*_t will be adjusted to [1, 2, 4, 8, 16, 32, 64] according to the rvv spec 1.0 isa. The adjusted mode precison of vbool*_t will help underlying pass to make

Re: [PATCH] libstdc++: Limit allocations in _Rb_tree 2/2

2023-03-01 Thread François Dumont via Gcc-patches
Just forget about this patch, bad idea. The key_type might have additional data not used for the comparison. This data would not be preserved if we were inserting the already stored equivalent key instead of the user provided. On 22/02/23 07:08, François Dumont wrote: This one is a

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Ian Lance Taylor
Bernhard Reutner-Fischer writes: > libgo/runtime/go-setenv.c|6 ++ > libgo/runtime/go-unsetenv.c |3 +-- Files in the libgo directory are mirrored from upstream sources, as described in libgo/README.gcc. Please don't change them in the gcc repository. Thanks. Ian

[Bug libstdc++/108974] std::barrier except completion function which is not manifestly noexcept

2023-03-01 Thread rodgertq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108974 Thomas Rodgers changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug libstdc++/108974] std::barrier except completion function which is not manifestly noexcept

2023-03-01 Thread rodgertq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108974 --- Comment #4 from Thomas Rodgers --- (In reply to Jiang An from comment #3) > > is_nothrow_invocable_v shall be true. > > If implementation divergence is not intendedly permitted, I don't think it > makes much sense to introduce UB in this

[PATCH 2/2] gcov: Fix incorrect gimple line LOCATION [PR97923]

2023-03-01 Thread Xionghu Luo via Gcc-patches
For case like belowi test.c: 1:int foo(char c) 2:{ 3: return ((c >= 'A' && c <= 'Z') 4: || (c >= 'a' && c <= 'z') 5: || (c >= '0' && c <='0'));} the generated line number is incorrect for condition c>='A' of block 2: Thus correct the condition op0 location. gcno diff before and

[PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-01 Thread Xionghu Luo via Gcc-patches
When spliting edge with self loop, the split edge should be placed just next to the edge_in->src, otherwise it may generate different position latch bbs for two consecutive self loops. For details, please refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93680#c4 Regression tested pass on

[Bug libstdc++/108974] std::barrier except completion function which is not manifestly noexcept

2023-03-01 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108974 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #3 from

Re: [PATCH, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-01 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2023/3/1 15:09, HAO CHEN GUI wrote: > Hi, > The patch escalates the failure when Hollerith constant to real conversion > fails in native_interpret_expr. It finally reports an "Unclassifiable > statement" error. > > The patch of pr95450 added a verification for

[COMMITTED] testsuite: Fix g++.dg/ext/attr-copy-2.C for default_packed targets

2023-03-01 Thread Hans-Peter Nilsson via Gcc-patches
Committed as obvious. FWIW, I'm on the side that emitting the warning when the reason is just that it's the default layout, is bad. A discussion took place years ago when the warning was added. -- >8 -- For targets where the byte-wise structure element layout is the same as for

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Jerry D via Gcc-patches
On 3/1/23 4:07 PM, Steve Kargl via Fortran wrote: On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via Fortran wrote: libgfortran/caf/single.c |6 ++ libgfortran/io/async.c |6 ++ libgfortran/io/format.c |3 +--

[COMMITTED] testsuite: Fix gcc.dg/attr-copy-6.c for user-label-prefixed targets

2023-03-01 Thread Hans-Peter Nilsson via Gcc-patches
Trivia: I copied that ASMNAME construct from the 18-year-minus-a-month old commit of r0-66993-gc5221531453e02, where it fixed a similar testsuite error. Committed as obvious. -- >8 -- This fixes: Running /x/gcc/testsuite/gcc.dg/dg.exp ... ... FAIL: gcc.dg/attr-copy-6.c (test for excess

[Bug driver/108865] gcc on Windows fails with Unicode path to source file

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865 --- Comment #14 from Andrew Pinski --- So the problem is host_extra_objs gets included in libbackend.a but since nothing references it inside the static library, it does not get linked into the cc1 ... Looks like other changes are needed to

Re: [PATCH, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-01 Thread Steve Kargl via Gcc-patches
On Thu, Mar 02, 2023 at 01:07:32AM +0100, Bernhard Reutner-Fischer wrote: > On Wed, 1 Mar 2023 07:39:40 -0800 > Steve Kargl via Gcc-patches wrote: > > > In fact, Hollerith should be hidden behind a -fallow-hollerith > > option and added to -std=legacy. > > While i'd be all for that, in my mind

Re: [PATCH 1/2] testsuite: Fix analyzer errors for newlib-errno

2023-03-01 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Thu, 2 Mar 2023 01:37:12 +0100 > From: Bernhard Reutner-Fischer > On Thu, 2 Mar 2023 00:54:33 +0100 > Hans-Peter Nilsson wrote: > > > > Date: Thu, 2 Mar 2023 00:23:36 +0100 > > > From: Bernhard Reutner-Fischer > > > > > On Wed, 1 Mar 2023 17:02:31 +0100 > > > Hans-Peter Nilsson via

[Bug driver/108865] gcc on Windows fails with Unicode path to source file

2023-03-01 Thread costas.argyris at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865 --- Comment #13 from Costas Argyris --- With the changes in the attached patch, the utf8 object file gets linked into gcc.exe but not cc1.exe - How can I achieve this?Basically this object file has to be linked pretty much in every

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Andrew Pinski via Gcc-patches
On Wed, Mar 1, 2023 at 3:52 PM Bernhard Reutner-Fischer wrote: > > On Wed, 1 Mar 2023 14:59:44 -0800 > Andrew Pinski wrote: > > > On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran > > wrote: > > > > > > Hi! > > > > > > Mere cosmetics. > > > > > > - if (foo != NULL) > > >

Re: [PATCH 1/2] testsuite: Fix analyzer errors for newlib-errno

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Thu, 2 Mar 2023 00:54:33 +0100 Hans-Peter Nilsson wrote: > > Date: Thu, 2 Mar 2023 00:23:36 +0100 > > From: Bernhard Reutner-Fischer > > > On Wed, 1 Mar 2023 17:02:31 +0100 > > Hans-Peter Nilsson via Gcc-patches wrote: > > > > > > From: Hans-Peter Nilsson > > > > Date: Wed, 1 Mar

Re: [PATCH, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 07:39:40 -0800 Steve Kargl via Gcc-patches wrote: > In fact, Hollerith should be hidden behind a -fallow-hollerith > option and added to -std=legacy. While i'd be all for that, in my mind this will block off literally all consultants and quite some scientists unless we error

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Steve Kargl via Gcc-patches
On Wed, Mar 01, 2023 at 10:28:56PM +0100, Bernhard Reutner-Fischer via Fortran wrote: > libgfortran/caf/single.c |6 ++ > libgfortran/io/async.c |6 ++ > libgfortran/io/format.c |3 +-- > libgfortran/io/transfer.c|6 ++ > libgfortran/io/unix.c

Re: [PATCH, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 10:40:15 +0100 Tobias Burnus wrote: > Hi, > > Please CC fortran@gcc for Fortran patches. > > --- a/gcc/fortran/target-memory.cc > > +++ b/gcc/fortran/target-memory.cc > > @@ -417,10 +417,13 @@ gfc_interpret_float (int kind, unsigned char *buffer, > > size_t buffer_size, > >

Re: [PATCH 1/2] testsuite: Fix analyzer errors for newlib-errno

2023-03-01 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Thu, 2 Mar 2023 00:23:36 +0100 > From: Bernhard Reutner-Fischer > On Wed, 1 Mar 2023 17:02:31 +0100 > Hans-Peter Nilsson via Gcc-patches wrote: > > > > From: Hans-Peter Nilsson > > > Date: Wed, 1 Mar 2023 16:36:46 +0100 > > > > > ... this is what I intend to commit later > > >

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 14:59:44 -0800 Andrew Pinski wrote: > On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran > wrote: > > > > Hi! > > > > Mere cosmetics. > > > > - if (foo != NULL) > > free (foo); > > > > With the caveat that coccinelle ruins replacement whitespace or i'm >

Re: [PATCH] Fix PR 108980: note without warning due to array bounds check

2023-03-01 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 01, 2023 at 03:25:00PM -0800, Andrew Pinski via Gcc-patches wrote: > The problem here is after r13-4748-g2a27ae32fabf85, in some > cases we were calling inform without a corresponding warning. > This changes the logic such that we only cause that to happen > if there was a warning

[Bug c++/107574] [10/11/12 Regression] ICE: tree check in cp_fold_convert with ptr to member field cast inside a class not completed and inherent since r9-50-gd760b06868d660bc

2023-03-01 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107574 Marek Polacek changed: What|Removed |Added Summary|[10/11/12/13 Regression]|[10/11/12 Regression] ICE:

[Bug c++/107574] [10/11/12/13 Regression] ICE: tree check in cp_fold_convert with ptr to member field cast inside a class not completed and inherent since r9-50-gd760b06868d660bc

2023-03-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107574 --- Comment #7 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:de81e06273c613d7e06cbe2c8d9e72826c638056 commit r13-6400-gde81e06273c613d7e06cbe2c8d9e72826c638056 Author: Marek Polacek Date:

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-03-01 Thread kees at outflux dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #6 from Kees Cook --- I really want to avoid the changes to sizeof() -- this will confuse a lot of other things. Sizeof is expected to be a constant expression, for example. I think the attribute is best since it avoids colliding

[Bug tree-optimization/108980] [13 Regression] Warning text missing the warning itself (GCC 13)

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108980 Andrew Pinski changed: What|Removed |Added Keywords||patch URL|

[PATCH] Fix PR 108980: note without warning due to array bounds check

2023-03-01 Thread Andrew Pinski via Gcc-patches
The problem here is after r13-4748-g2a27ae32fabf85, in some cases we were calling inform without a corresponding warning. This changes the logic such that we only cause that to happen if there was a warning happened before hand. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Re: [PATCH 1/2] testsuite: Fix analyzer errors for newlib-errno

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 17:02:31 +0100 Hans-Peter Nilsson via Gcc-patches wrote: > > From: Hans-Peter Nilsson > > Date: Wed, 1 Mar 2023 16:36:46 +0100 > > > ... this is what I intend to commit later > > today, just keeping the added comment as brief as > > reasonable: > > Except I see the hook

Re: Debugging C++ frontend using CLion IDE

2023-03-01 Thread Tim Lange
Hi Berke, I had the same problem last year. Many IDEs don't really work for developing gcc. Most here probably use either emacs or vim. If you want to use an IDE, you might have to do some hacks. The oldschool indentation style of gcc (mix of tab and spaces) is not widely supported.

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Andrew Pinski via Gcc-patches
On Wed, Mar 1, 2023 at 1:31 PM Bernhard Reutner-Fischer via Fortran wrote: > > Hi! > > Mere cosmetics. > > - if (foo != NULL) > free (foo); > > With the caveat that coccinelle ruins replacement whitespace or i'm > uneducated enough to be unable to _not_ run the diff through > sed -e

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 22:58:59 +0100 Bernhard Reutner-Fischer wrote: > On Wed, 1 Mar 2023 22:28:56 +0100 > Bernhard Reutner-Fischer wrote: > > > Remarks: > > 1) We should do this in if-conversion (?) on our own. > >I suppose. Independently of -fdelete-null-pointer-checks > > and iff we can

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-03-01 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #5 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #3) > (In reply to Richard Biener from comment #2) > > Iff only (GNU) C would accept the following ... > > > > struct foo { > > ... > > unsigned

Re: Re: [PATCH] RISC-V: Bugfix for rvv bool mode precision adjustment

2023-03-01 Thread juzhe.zhong
>> Does the eventual value set by ADJUST_BYTESIZE equal the real number of >> bytes loaded by vlm.v and stored by vstm.v (after the appropriate vsetvl)? >> Or is the GCC size larger in some cases than the number of bytes >> loaded and stored? For VNx1BI,VNx2BI,VNx4BI,VNx8BI, we allocate the larger

Re: [PATCH] c++: Add target hook for emit_support_tinfos [PR108883]

2023-03-01 Thread Jason Merrill via Gcc-patches
On 2/27/23 18:51, Jakub Jelinek wrote: On Mon, Feb 27, 2023 at 06:26:04PM -0500, Jason Merrill wrote: The following patch instead adds a target hook which allows the backend to temporarily tweak registered types such that emit_support_tinfos emits whatever is needed. Why handle these types

[Bug analyzer/107565] [12/13 Regression] -Wanalyzer-use-of-uninitialized-value false positive with rdrand

2023-03-01 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107565 David Malcolm changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #6 from David

Re: [PATCH] c++: ICE with -Wmismatched-tags and member template [PR106259]

2023-03-01 Thread Marek Polacek via Gcc-patches
On Wed, Mar 01, 2023 at 04:44:12PM -0500, Jason Merrill wrote: > On 3/1/23 16:40, Marek Polacek wrote: > > On Wed, Mar 01, 2023 at 04:30:16PM -0500, Jason Merrill wrote: > > > On 3/1/23 15:33, Marek Polacek wrote: > > > > -Wmismatched-tags warns about the (harmless) struct/class mismatch. > > > >

[pushed] analyzer: fixes to side-effects for built-in functions [PR107565]

2023-03-01 Thread David Malcolm via Gcc-patches
Previously, if the analyzer saw a call to a non-pure and non-const built-in function that it didn't have explicit knowledge of the behavior of, it would fall back to assuming that the builtin could have arbitrary behavior, similar to a function defined outside of the current TU. However, this

[Bug tree-optimization/108988] gimple_fold_builtin_fputs doesn't preserve gimple_builtin_call_types_compatible_p

2023-03-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108988 --- Comment #3 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:24ebc5404b88b765221b551dc5288f6d64ba3dc7 commit r13-6398-g24ebc5404b88b765221b551dc5288f6d64ba3dc7 Author: David Malcolm Date:

[Bug analyzer/107565] [12/13 Regression] -Wanalyzer-use-of-uninitialized-value false positive with rdrand

2023-03-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107565 --- Comment #5 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:24ebc5404b88b765221b551dc5288f6d64ba3dc7 commit r13-6398-g24ebc5404b88b765221b551dc5288f6d64ba3dc7 Author: David Malcolm Date:

[Bug tree-optimization/108988] gimple_fold_builtin_fputs doesn't preserve gimple_builtin_call_types_compatible_p

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108988 Andrew Pinski changed: What|Removed |Added Keywords||internal-improvement

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 1 Mar 2023 22:28:56 +0100 Bernhard Reutner-Fischer wrote: > Remarks: > 1) We should do this in if-conversion (?) on our own. >I suppose. Independently of -fdelete-null-pointer-checks and iff we can prove that ptr was NULL when passed to free(ptr) then we can elide the call, of

[Bug middle-end/108988] gimple_fold_builtin_fputs doesn't preserve gimple_builtin_call_types_compatible_p

2023-03-01 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108988 --- Comment #1 from David Malcolm --- Replacement stmt is created here: (gdb) bt #0 gimple_set_op (gs=, i=1, op=) at ../../src/gcc/gimple.h:2629 #1 0x01093a6f in gimple_build_call_1 (fn=, nargs=4) at ../../src/gcc/gimple.cc:234 #2

[Bug middle-end/108988] New: gimple_fold_builtin_fputs doesn't preserve gimple_builtin_call_types_compatible_p

2023-03-01 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108988 Bug ID: 108988 Summary: gimple_fold_builtin_fputs doesn't preserve gimple_builtin_call_types_compatible_p Product: gcc Version: 13.0 Status: UNCONFIRMED

Re: [PATCH v4] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-03-01 Thread Jason Merrill via Gcc-patches
On 2/7/23 11:46, Marek Polacek wrote: On Sun, Feb 05, 2023 at 05:25:25PM -0800, Jason Merrill wrote: On 1/24/23 17:49, Marek Polacek wrote: On Fri, Jan 20, 2023 at 03:19:54PM -0500, Jason Merrill wrote: On 1/19/23 21:03, Marek Polacek wrote: On Thu, Jan 19, 2023 at 01:02:02PM -0500, Jason

Re: [PATCH] c++: ICE with -Wmismatched-tags and member template [PR106259]

2023-03-01 Thread Jason Merrill via Gcc-patches
On 3/1/23 16:40, Marek Polacek wrote: On Wed, Mar 01, 2023 at 04:30:16PM -0500, Jason Merrill wrote: On 3/1/23 15:33, Marek Polacek wrote: -Wmismatched-tags warns about the (harmless) struct/class mismatch. For, e.g., template struct A { }; class A a; it works by adding A to the

Re: [PATCH] c++: ICE with -Wmismatched-tags and member template [PR106259]

2023-03-01 Thread Marek Polacek via Gcc-patches
On Wed, Mar 01, 2023 at 04:30:16PM -0500, Jason Merrill wrote: > On 3/1/23 15:33, Marek Polacek wrote: > > -Wmismatched-tags warns about the (harmless) struct/class mismatch. > > For, e.g., > > > >template struct A { }; > >class A a; > > > > it works by adding A to the class2loc hash

[Bug fortran/106856] [12/13 Regression][OOP] CLASS attribute handling / ICE in gfc_conv_expr_present, at fortran/trans-expr.cc:1977 since r12-4346-geb92cd57a1ebe7cd

2023-03-01 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106856 --- Comment #4 from anlauf at gcc dot gnu.org --- Created attachment 54567 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54567=edit Updated patch The original patches started to bit-rot, so here is an updated version. The current

Re: [PATCH 1/2] c++: factor out TYPENAME_TYPE substitution

2023-03-01 Thread Jason Merrill via Gcc-patches
On 2/21/23 19:05, Patrick Palka wrote: On Sun, 19 Feb 2023, Jason Merrill wrote: On 2/15/23 12:11, Patrick Palka wrote: On Wed, 15 Feb 2023, Jason Merrill wrote: On 2/15/23 09:21, Patrick Palka wrote: On Tue, 14 Feb 2023, Jason Merrill wrote: On 2/13/23 09:23, Patrick Palka wrote: [N.B.

Re: [PATCH] c++: ICE with -Wmismatched-tags and member template [PR106259]

2023-03-01 Thread Jason Merrill via Gcc-patches
On 3/1/23 15:33, Marek Polacek wrote: -Wmismatched-tags warns about the (harmless) struct/class mismatch. For, e.g., template struct A { }; class A a; it works by adding A to the class2loc hash table while parsing the class-head and then, while parsing the elaborate type-specifier, we

[PATCH][stage1] Remove conditionals around free()

2023-03-01 Thread Bernhard Reutner-Fischer via Gcc-patches
Hi! Mere cosmetics. - if (foo != NULL) free (foo); With the caveat that coccinelle ruins replacement whitespace or i'm uneducated enough to be unable to _not_ run the diff through sed -e 's/^+\([[:space:]]*\)free(/+\1free (/' at least. If anybody knows how to improve replacement

[committed] libstdc++: Fix typo in comment in bits/cow_string.h

2023-03-01 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/cow_string.h: Fix typo in comment. --- libstdc++-v3/include/bits/cow_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/cow_string.h

[committed] libstdc++: Make std::chrono::current_zone() default to UTC

2023-03-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux and powerpc-aix. Pushed to trunk. -- >8 -- This is consistent with the behaviour of glibc, which assumes UTC when /etc/localtime and TZ do not identify a valid time zone. The fallback tzdb used when no valid tzdata exists always contains the UTC zone, so this change means we

Re: [PATCH] c++: can't eval PTRMEM_CST in incomplete class [PR107574]

2023-03-01 Thread Jason Merrill via Gcc-patches
On 2/2/23 19:28, Marek Polacek wrote: Here we're attempting to evaluate a PTRMEM_CST in a class that hasn't been completed yet, but that doesn't work: /* We can't lower this until the class is complete. */ if (!COMPLETE_TYPE_P (DECL_CONTEXT (member))) return cst;

[Bug testsuite/108973] [13 Regression] Sufficiently narrow terminal window causes selftest failure

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108973 Andrew Pinski changed: What|Removed |Added Summary|Sufficiently narrow |[13 Regression]

[Bug testsuite/108973] Sufficiently narrow terminal window causes selftest failure

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108973 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic, |

Re: [PATCH] vect: Check that vector factor is a compile-time constant

2023-03-01 Thread Michael Collison
Okay there seems to be consensus on using constant_lower_bound (vf), but I don't understand how that is a replacement for "vf.is_constant ()"? In one case we are checking if "vf" is a constant, on the other we are asking for the lower bound. For the crash in question "constant_lower_bound (vf)

Re: [PATCH] c++: can't eval PTRMEM_CST in incomplete class [PR107574]

2023-03-01 Thread Marek Polacek via Gcc-patches
Ping. On Thu, Feb 02, 2023 at 07:28:25PM -0500, Marek Polacek via Gcc-patches wrote: > Here we're attempting to evaluate a PTRMEM_CST in a class that hasn't > been completed yet, but that doesn't work: > > /* We can't lower this until the class is complete. */ > if

Re: [PATCH v4] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-03-01 Thread Marek Polacek via Gcc-patches
Ping. On Tue, Feb 07, 2023 at 11:46:10AM -0500, Marek Polacek wrote: > On Sun, Feb 05, 2023 at 05:25:25PM -0800, Jason Merrill wrote: > > On 1/24/23 17:49, Marek Polacek wrote: > > > On Fri, Jan 20, 2023 at 03:19:54PM -0500, Jason Merrill wrote: > > > > On 1/19/23 21:03, Marek Polacek wrote: > >

[PATCH] c++: ICE with -Wmismatched-tags and member template [PR106259]

2023-03-01 Thread Marek Polacek via Gcc-patches
-Wmismatched-tags warns about the (harmless) struct/class mismatch. For, e.g., template struct A { }; class A a; it works by adding A to the class2loc hash table while parsing the class-head and then, while parsing the elaborate type-specifier, we add A. At the end of c_parse_file we go

[Bug tree-optimization/108980] [13 Regression] Warning text missing the warning itself (GCC 13)

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108980 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

Re: [PATCH] debug/108772 - ICE with late debug generated with -flto

2023-03-01 Thread Jason Merrill via Gcc-patches
On 3/1/23 08:09, Jakub Jelinek wrote: On Wed, Mar 01, 2023 at 01:07:02PM +, Richard Biener wrote: When combining -g1 with -flto we run into the DIE location annotation machinery for globals calling dwarf2out_late_global_decl but not having any early generated DIE for function scope statics.

[Bug target/108987] [13 Regression] RISC-V: shiftadd cost model bug needlessly preferring syth_multiply

2023-03-01 Thread vineetg at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108987 --- Comment #1 from Vineet Gupta --- Fix posted here https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613106.html Essentially: case PLUS: if (TARGET_ZBA && mode == word_mode && GET_CODE (XEXP (x, 0)) == MULT

Re: [PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-01 Thread Philipp Tomsich
On Wed, 1 Mar 2023 at 20:53, Vineet Gupta wrote: > > This showed up as dynamic icount regression in SPEC 531.deepsjeng with > upstream > gcc (vs. gcc 12.2). gcc was resorting to synthetic multiply using shift+add(s) > even when multiply had clear cost benefit. > > |000133b8

[PATCH] RISC-V: costs: miscomputed shiftadd_cost triggering synth_mult [PR/108987]

2023-03-01 Thread Vineet Gupta
This showed up as dynamic icount regression in SPEC 531.deepsjeng with upstream gcc (vs. gcc 12.2). gcc was resorting to synthetic multiply using shift+add(s) even when multiply had clear cost benefit. |000133b8 : | 133b8: srl a3,a1,s6 | 133bc: and a3,a3,s5 |

[Bug target/108987] New: [13 Regression] RISC-V: shiftadd cost model bug needlessly preferring syth_multiply

2023-03-01 Thread vineetg at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108987 Bug ID: 108987 Summary: [13 Regression] RISC-V: shiftadd cost model bug needlessly preferring syth_multiply Product: gcc Version: 13.0 Status: UNCONFIRMED

Re: [PATCH] c++: unevaluated array new-expr size constantness [PR108219]

2023-03-01 Thread Patrick Palka via Gcc-patches
On Wed, 1 Mar 2023, Jason Merrill wrote: > On 3/1/23 12:20, Patrick Palka wrote: > > On Wed, 1 Mar 2023, Jason Merrill wrote: > > > > > On 3/1/23 10:32, Patrick Palka wrote: > > > > On Mon, 27 Feb 2023, Jason Merrill wrote: > > > > > > > > > On 2/22/23 14:45, Patrick Palka wrote: > > > > > >

[Bug c++/108219] [12 Regression] requirement fails on a valid expression since r12-5253-g4df7f8c79835d569

2023-03-01 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108219 Patrick Palka changed: What|Removed |Added Known to work||13.0 Summary|[12/13

[Bug c++/108218] [12/13 Regression] Constant arguments in the new expression is not checked in unevaluated operand since r12-5253-g4df7f8c79835d569

2023-03-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108218 --- Comment #14 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:096f034a8f5df41f610e62c1592fb90a3f551cd5 commit r13-6395-g096f034a8f5df41f610e62c1592fb90a3f551cd5 Author: Patrick Palka Date:

[Bug c++/108219] [12/13 Regression] requirement fails on a valid expression since r12-5253-g4df7f8c79835d569

2023-03-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108219 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:096f034a8f5df41f610e62c1592fb90a3f551cd5 commit r13-6395-g096f034a8f5df41f610e62c1592fb90a3f551cd5 Author: Patrick Palka Date:

[Bug tree-optimization/108980] [13 Regression] Warning text missing the warning itself (GCC 13)

2023-03-01 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108980 --- Comment #9 from Thiago Macieira --- Ah, got it. That also explains why I couldn't find anything wrong with my code, and nothing I did that could likely be it made the warning go away. Thanks for the quick turnaround.

Re: GSoC: Interest in taking the `-ftime-trace` project

2023-03-01 Thread Martin Jambor
Hello Kristiyan, On Wed, Feb 08 2023, Kristiyan Stoimenov via Gcc wrote: > Hello, > > I would like to ask whether I could be part of the upcoming GSoC. I have > been wanting to contribute to the project for some time now and I think > that this would be a nice opportunity for that. > > I have

[Bug tree-optimization/108980] [13 Regression] Warning text missing the warning itself (GCC 13)

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108980 --- Comment #8 from Andrew Pinski --- (In reply to Thiago Macieira from comment #7) > The duplicate "note:" disappeared. But now there's no warning at all on the > same file, with the same options. Was that intended? Yes that was the intent of

[Bug c/108986] Incorrect warning for [static] array parameter

2023-03-01 Thread Keith.S.Thompson at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108986 --- Comment #1 from Keith Thompson --- A similar case. The warning refers to the size in bytes, but unlike the first case it's not incorrect, though referring to the length would IMHO be clearer. Note also that the warning appears twice. It

[Bug c/108986] New: Incorrect warning for [static] array parameter

2023-03-01 Thread Keith.S.Thompson at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108986 Bug ID: 108986 Summary: Incorrect warning for [static] array parameter Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug tree-optimization/108980] [13 Regression] Warning text missing the warning itself (GCC 13)

2023-03-01 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108980 --- Comment #7 from Thiago Macieira --- The duplicate "note:" disappeared. But now there's no warning at all on the same file, with the same options. Was that intended?

[Bug fortran/92639] Error: Integer too big for its kind at (1)

2023-03-01 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92639 --- Comment #4 from Steve Kargl --- On Wed, Mar 01, 2023 at 05:51:29PM +, cessenat at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92639 > > --- Comment #2 from Olivier Cessenat --- > integer(kind=4) valid range is

[Bug fortran/92639] Error: Integer too big for its kind at (1)

2023-03-01 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92639 Jerry DeLisle changed: What|Removed |Added CC||jvdelisle at gcc dot gnu.org ---

Re: libquadmath fix for 94756 and 87204

2023-03-01 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 21, 2023 at 04:31:52PM +, i.nixman--- via Gcc-patches wrote: > > Why? > > could you explain which of the nine lines are you talking about? All the uselessly changed ones. > > As for the rest, it would help if you could list the exact glibc commits > > which you've ported to

Re: Debugging C++ frontend using CLion IDE

2023-03-01 Thread Paul Smith
On Wed, 2023-03-01 at 20:59 +0300, Berke Yavas via Gcc wrote: > One thing I haven't figured out yet, how can I debug C++ frontend(or > any other language frontend) with CLion. If anybody managed to do > this (or using another IDE), could you please share your settings > with me? Since CLion is

[Bug c/108982] While recompiling when even we modify any line in got its giving error

2023-03-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108982 --- Comment #15 from Jakub Jelinek --- And please stop reopening this bugzilla bug. There is no bug on the GCC side, and this should be handled on gcc-help mailing list, not here.

RE: [PATCH 1/2]middle-end: Fix wrong overmatching of div-bitmask by using new optabs [PR108583]

2023-03-01 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Andrew Carlotti > Sent: Wednesday, March 1, 2023 4:58 PM > To: Andrew MacLeod > Cc: Tamar Christina ; Richard Biener > ; Richard Sandiford ; > Tamar Christina via Gcc-patches ; nd > ; j...@ventanamicro.com > Subject: Re: [PATCH 1/2]middle-end: Fix wrong

Re: Debugging C++ frontend using CLion IDE

2023-03-01 Thread Charalampos Mitrodimas via Gcc
Hi Berke, > Hi, > > I am trying to set up my environment for the upcoming google summer of > code. One thing I haven't figured out yet, how can I debug C++ frontend(or > any other language frontend) with CLion. If anybody managed to do this(or > using another IDE), could you please share your

[PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset

2023-03-01 Thread Xi Ruoyao via Gcc-patches
Stack protector needs a guard value on the stack and change the stack layout. So we need to disable it for those tests, to avoid test failure with --enable-default-ssp. gcc/testsuite/ChangeLog: * gcc.target/aarch64/shrink_wrap_1.c (dg-options): Add -fno-stack-protector.

[PATCH 5/8] aarch64: testsuite: disable stack protector for pr103147-10 tests

2023-03-01 Thread Xi Ruoyao via Gcc-patches
Stack protector influence code generation and cause function body checks fail. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr103147-10.c (dg-options): Add -fno-stack-protector. * g++.target/aarch64/pr103147-10.C: Likewise. ---

[PATCH] libiberty: fix memory leak in pex-win32.c and refactor

2023-03-01 Thread Costas Argyris via Gcc-patches
Hi It seems that the win32_spawn function in libiberty/pex-win32.c is leaking the cmdline buffer in 2/3 exit scenarios (it is only free'd in 1/3).The problem here is that the cleanup code is written 3 times, one at each exit scenario. The proposed attached refactoring has the cleanup code

Re: Debugging C++ frontend using CLion IDE

2023-03-01 Thread Charalampos Mitrodimas via Gcc
Hi Berke, Hi, I am trying to set up my environment for the upcoming google summer of code. One thing I haven't figured out yet, how can I debug C++ frontend(or any other language frontend) with CLion. If anybody managed to do this(or using another IDE), could you please share your settings

[Bug c/108982] While recompiling when even we modify any line in got its giving error

2023-03-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108982 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[PATCH 2/8] aarch64: testsuite: disable PIE for tests with large code model [PR70150]

2023-03-01 Thread Xi Ruoyao via Gcc-patches
These tests set large code model with -mcmodel=large or target pragma for AArch64. But if GCC is configured with --enable-default-pie, it triggers "sorry: unimplemented: code model large with -fpic". Disable PIE to make avoid the issue. gcc/testsuite/ChangeLog: PR testsuite/70150

  1   2   3   >