Re: A problem of weak & weakref function attribute

2022-12-09 Thread Andrew Pinski via Gcc
On Fri, Dec 9, 2022 at 7:17 PM 刘畅 via Gcc wrote: > > Hi all, > > I met a problem when I was testing the weak attribute and the weakref > attribute of GCC. I've read the documentation and in the 6.33.1 Common > Function Attributes - weakref part I found: > > Without a target given as an argumen

A problem of weak & weakref function attribute

2022-12-09 Thread 刘畅 via Gcc
Hi all, I met a problem when I was testing the weak attribute and the weakref attribute of GCC. I've read the documentation and in the 6.33.1 Common Function Attributes - weakref part I found: Without a target given as an argument to weakref or to alias, weakref is equivalent to weak (in that

Re: The method of determining the specific assignment of gcc optimization options

2022-12-09 Thread hongjie wu via Gcc
Thank you for your response. Jonathan Wakely 于2022年12月9日周五 22:40写道: > This question belongs on the gcc-help mailing list, not here. > > On Fri, 9 Dec 2022 at 12:01, hongjie wu via Gcc wrote: > > > > Dear Sir or Madam, > > I want to know how to obtain optimal level of the value of the >

gcc-11-20221209 is now available

2022-12-09 Thread GCC Administrator via Gcc
Snapshot gcc-11-20221209 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20221209/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Re: [IRA] Code bloat due to register spills in v9, v10, v11, v12 and master

2022-12-09 Thread Vladimir Makarov via Gcc
On 2022-12-09 14:23, Georg-Johann Lay wrote: There is the following code size regression, filed as https://gcc.gnu.org/PR90706 I am sorry, I feel your frustration. I was not aware of this PR. Unfortunately, the PR was marked as P4 and I have too many open PRs and should prioritize them.

Re: Spurious warning for zero-sized array parameters to a function

2022-12-09 Thread Alejandro Colomar via Gcc
On 12/9/22 21:19, Alejandro Colomar wrote: Hi Martin, On 12/9/22 21:04, mse...@gmail.com wrote: Most of these warnings are designed to find simple mistakes in common use cases so "tricky," unusual, or otherwise unexpected code is likely to lead to surprises.  This warning expects that in c

Re: Spurious warning for zero-sized array parameters to a function

2022-12-09 Thread Alejandro Colomar via Gcc
Hi Martin, On 12/9/22 21:04, mse...@gmail.com wrote: Most of these warnings are designed to find simple mistakes in common use cases so "tricky," unusual, or otherwise unexpected code is likely to lead to surprises. This warning expects that in calls to a function, every parameter declared u

Re: Spurious warning for zero-sized array parameters to a function

2022-12-09 Thread msebor--- via Gcc
> On Dec 6, 2022, at 9:22 AM, Alejandro Colomar via Gcc wrote: > > Hi! > > In the following function, past_end is a pointer to one-past-the-end of the > array. Holding such a pointer is legal in C. I use it as a sentinel value > that helps (1) avoid overrunning the buffer, and (2) detect tr

[IRA] Code bloat due to register spills in v9, v10, v11, v12 and master

2022-12-09 Thread Georg-Johann Lay
There is the following code size regression, filed as https://gcc.gnu.org/PR90706 Simple test cases are, for example #define PORT (*((unsigned char volatile*) 0x24)) unsigned short var16; void func (void) { if (2048000ul * var16 > 120ul) PORT |= 1; } When I compile it with $

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-09 Thread David Blaikie via Gcc
Thanks Iain for the summary/thanks everyone for the discussion! On Fri, Dec 9, 2022 at 9:33 AM Iain Sandoe wrote: > > Hello all. > > > On 9 Dec 2022, at 01:58, chuanqi.xcq wrote: > > > > It looks like `-fmodule-file` is better from the discussion. So let's take > > it. Thanks for everyone here

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-09 Thread Iain Sandoe
Hello all. > On 9 Dec 2022, at 01:58, chuanqi.xcq wrote: > > It looks like `-fmodule-file` is better from the discussion. So let's take > it. Thanks for everyone here So FAOD (after this discussion) Chuanqi's current patchset implements the following in clang: -fmodule-output - this cause

Re: Spurious warning for zero-sized array parameters to a function

2022-12-09 Thread Alejandro Colomar via Gcc
Hi Richard, On 12/7/22 09:17, Richard Biener wrote: [...] The warnings are invalid. While it's true that I'm referencing a pointer of size 0, it's false that I'm "accessing 1 byte" in that region. I guess this is all about the bogus design of 'static' in ISO C, where you can have an array par

Missing optimization: mempcpy(3) vs memcpy(3)

2022-12-09 Thread Alejandro Colomar via Gcc
Hi! I expect mempcpy(3) to be at least as fast as memcpy(3), since it performs the same operations, with the exception that mempcpy(3) returns something useful (as opposed to memcpy(3), which could perfectly return void), and in fact something more likely to be in cache, if the copy is perform

Re: The method of determining the specific assignment of gcc optimization options

2022-12-09 Thread Jonathan Wakely via Gcc
This question belongs on the gcc-help mailing list, not here. On Fri, 9 Dec 2022 at 12:01, hongjie wu via Gcc wrote: > > Dear Sir or Madam, > I want to know how to obtain optimal level of the value of the What do you mean by optimal? They have pros and cons. > specific compiler options

The method of determining the specific assignment of gcc optimization options

2022-12-09 Thread hongjie wu via Gcc
Dear Sir or Madam, I want to know how to obtain optimal level of the value of the specific compiler options, for example - fexcess - precision = [fast | standard] [default], including the default represent?Or how to determine? I am looking forward to your favorable replay.

Support

2022-12-09 Thread rajrao via Gcc
Dear team, I am working in the compiler domain. Can you please provide the source application where the mis-compilation errors occurred which has been detected by the GCC compiler. This support is very helpful for my PHD work. - P Rajshekhar Rao Thanks and Regards