Re: _Nullable and _Nonnull in GCC's analyzer (was: [PATCH v5] libio: Add nonnull attribute for most FILE * arguments in stdio.h)

2023-08-09 Thread Martin Uecker
Am Dienstag, dem 08.08.2023 um 17:14 -0700 schrieb enh: > (bionic maintainer here, mostly by accident...) > > yeah, we tried the GCC attributes once before with _disastrous_ > results (because GCC saw it as an excuse to delete explicit null > checks, it broke all kinds of things). Thanks! I am cu

Please see the following post. Some of you may know the answer.

2023-08-09 Thread Luís Carlos Carneiro Gonçalves via Gcc
https://community.intel.com/t5/GPU-Compute-Software/Intel-GPU-OpenCL-with-g-O3-flag/m-p/1512130/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufExMMkkxSjhRTU1HMjZZfDE1MTIxMzB8U1VCU0NSSVBUSU9OU3xoSw

Re: Please see the following post. Some of you may know the answer.

2023-08-09 Thread Jonathan Wakely via Gcc
On Wed, 9 Aug 2023 at 10:00, Luís Carlos Carneiro Gonçalves via Gcc wrote: > > https://community.intel.com/t5/GPU-Compute-Software/Intel-GPU-OpenCL-with-g-O3-flag/m-p/1512130/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufExMMkkxSjhRTU1HMjZZfDE1MTIxMzB8U1VCU0NSSVBUSU9OU3xoSw This is the wrong mailin

Re: Please see the following post. Some of you may know the answer.

2023-08-09 Thread Luís Carlos Carneiro Gonçalves via Gcc
Good morning (here), Without -O3 and -O2 the OpenCL gave consistently good results without returning any error. I think my code is Ok but I open to criticism. I call the dynamic library from a Python script (Ctypes package). If you are open to help me I can send all the sources. Thanks, Lu

ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer)

2023-08-09 Thread Alejandro Colomar via Gcc
Hi Martin, On 2023-08-09 09:26, Martin Uecker wrote: > it is a bit cumbersome to use, but one can use [static] > instead, which gives you the same static warnings. > > [static] does not work with __builtin_dynamic_object_size, > but maybe this could be changed (there is a bug filed.) > > I am no

LRA for avr: Arithmetic on stack pointer

2023-08-09 Thread SenthilKumar.Selvaraj--- via Gcc
Hi, After turning on FP -> SP elimination after Vlad fixed an elimination issue in https://gcc.gnu.org/git?p=gcc.git;a=commit;h=2971ff7b1d564ac04b537d907c70e6093af70832, I'm now running into reload failure if arithmetic is done on SP. For a call to a vararg functions, the avr target push

Re: ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer)

2023-08-09 Thread Martin Uecker
Hi Alejandro! Am Mittwoch, dem 09.08.2023 um 12:42 +0200 schrieb Alejandro Colomar: ... > > As for when one would want to mean the first (size of array) > but not _Nonnull: for a function where you may pass either > an array (which should not be smaller than the size), or a > sentinel NULL va

Re: ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer)

2023-08-09 Thread Alejandro Colomar via Gcc
Hi Martin! On 2023-08-09 14:03, Martin Uecker wrote: [...] >> GCC could perfectly add a warning for the following case: >> >> void foo(size_t n, int a[n]); >> >> int >> main(void) >> { >> int a[7]; >> >> foo(42, a); >> } >> >> Nobody in their right mind would s

Re: ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer)

2023-08-09 Thread Xi Ruoyao via Gcc
On Wed, 2023-08-09 at 12:42 +0200, Alejandro Colomar wrote: > I have a gripe with ISO C's [static].  As you mention, ISO > conflated two functionalities in [static]: > > -  The size of the array passed as argument must not be less >    than the size specified in the parameter's []. > > -  The poi

Re: Please see the following post. Some of you may know the answer.

2023-08-09 Thread Paul Smith
On Wed, 2023-08-09 at 11:14 +0200, Luís Carlos Carneiro Gonçalves via Gcc wrote: > Without -O3 and -O2 the OpenCL gave consistently good results without > returning any error. > > I think my code is Ok but I open to criticism. By "has a bug" we don't necessarily mean something that is obviously w

Re: Please see the following post. Some of you may know the answer.

2023-08-09 Thread Luís Carlos Carneiro Gonçalves via Gcc
It was a bug. I already corrected. It was an array with bad dimensions. It was like: int a[2]; a[2]=1; ** Corrected to: int a[3]; I updated the post in the Intel Forum. Sorry. Thanks. Luís Gonçalves On 09/08/2023 15:50, Paul Smith wrote: On Wed,

Re: ISO C's [static] (was: _Nullable and _Nonnull in GCC's analyzer)

2023-08-09 Thread Martin Uecker
Am Mittwoch, dem 09.08.2023 um 14:37 +0200 schrieb Alejandro Colomar: > Hi Martin! > > On 2023-08-09 14:03, Martin Uecker wrote: > > Regarding the issues you have with _Nonnull being a qualifier, > I've been thinking about it for a long time and don't yet have > a concrete answer. The more I t

Re: LRA for avr: Arithmetic on stack pointer

2023-08-09 Thread Georg-Johann Lay
Am 09.08.23 um 13:15 schrieb SenthilKumar.Selvaraj--- via Gcc: [...] I guess the condition exists to ensure sp_off is always correct? Considering LRA already handles post_dec of SP just fine, perhaps it can allow RTX like (set (reg/f:HI 32 __SP_L__) (plus:HI (reg/f:HI 32 __SP_L__

[PATCH v2] analyzer: More features for CPython analyzer plugin [PR107646]

2023-08-09 Thread Eric Feng via Gcc
Thank you for your help in getting dg-require-python-h working! I can confirm that the FAILs are related to differences between the --cflags affecting the gimple seen by the analyzer. For this reason, I have changed it to --includes for now. To be sure, I tested on Python 3.8 as well and it works a

Re: LRA for avr: Arithmetic on stack pointer

2023-08-09 Thread Vladimir Makarov via Gcc
On 8/9/23 07:15, senthilkumar.selva...@microchip.com wrote: Hi, After turning on FP -> SP elimination after Vlad fixed an elimination issue in https://gcc.gnu.org/git?p=gcc.git;a=commit;h=2971ff7b1d564ac04b537d907c70e6093af70832, I'm now running into reload failure if arithmetic is d

Re: [PATCH v2] analyzer: More features for CPython analyzer plugin [PR107646]

2023-08-09 Thread David Malcolm via Gcc
On Wed, 2023-08-09 at 15:22 -0400, Eric Feng wrote: > Thank you for your help in getting dg-require-python-h working! I can > confirm that the FAILs are related to differences between the -- > cflags > affecting the gimple seen by the analyzer. For this reason, I have > changed it to --includes for