Re: -Wfloat-equal and comparison to zero

2024-11-09 Thread Andrew Pinski via Gcc
On Sat, Nov 9, 2024, 11:19 AM Sad Clouds via Gcc wrote: > Hello, I don't know if this is a known GCC bug or intentional design, > but code like this: > > double value = 0.0; > ... > if (value == 0.0) > { > ... > } > > Results in the following warning with gcc-12.2.0: > > "... warning: com

Re: Sourceware forge experiment

2024-10-25 Thread Andrew Pinski via Gcc
On Thu, Oct 24, 2024 at 1:25 PM Andrew Pinski wrote: > > On Sun, Oct 20, 2024 at 6:26 PM Mark Wielaard wrote: > > > > As an experiment Sourceware is now running an forgejo v9 instance at > > https://forge.sourceware.org > > > > Everybody with an @sourceware.org, @cygwin.com or @gcc.gnu.org addres

Re: Sourceware forge experiment

2024-10-24 Thread Andrew Pinski via Gcc
On Sun, Oct 20, 2024 at 6:26 PM Mark Wielaard wrote: > > As an experiment Sourceware is now running an forgejo v9 instance at > https://forge.sourceware.org > > Everybody with an @sourceware.org, @cygwin.com or @gcc.gnu.org address > can register an account (please use the same user name as your a

Re: Where does this dead statement generated in switch conversion come from?

2024-10-03 Thread Andrew Pinski via Gcc
On Thu, Oct 3, 2024 at 7:51 AM Filip Kastl wrote: > > Hi All, > > While toying with the switch conversion GIMPLE pass I noticed that the pass > generates a dead statement. I wanted to investigate why this happens and > potentially fix this. However after looking into the part of the pass > respo

spelling of `side effects` vs `side-effects`

2024-09-23 Thread Andrew Pinski via Gcc
While working on the review from https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663418.html . I noticed that there are places which use `side effects` and some use `side-effects`. I assume we should follow a similar pattern as `back-end` vs `back end`. That is `side effect` when used as a

DEI statement and why we should have one

2024-09-14 Thread Andrew Pinski via Gcc
Listening to Nathan Sidwell's 2022 talk on Diversity and Inclusion, he mentioned we (GCC) should have a small statement about Diversity and Inclusion (I think equality should be mentioned too). I agree and I noticed there was no movement on this front and has been no mention of it since either. Ma

Re: Update bootstrap requirement to C++14?

2024-09-14 Thread Andrew Pinski via Gcc
On Sat, Sep 14, 2024 at 8:53 AM Jason Merrill via Gcc wrote: > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > since support was complete in GCC 5); perhaps it's

Re: #pragma once behavior

2024-09-06 Thread Andrew Pinski via Gcc
On Fri, Sep 6, 2024, 7:42 PM Jeremy Rifkin wrote: > Hi Andrew, > Thanks for the thoughts and quick reply. > > > Not always. because inodes are not always stable on some file systems. > > And also does not work with multi-mounted devices too. > > Unusual filesystems and multiple mounts are indeed

Re: #pragma once behavior

2024-09-06 Thread Andrew Pinski via Gcc
On Fri, Sep 6, 2024 at 5:49 PM Jeremy Rifkin wrote: > > Thanks Andrew, I appreciate the context and links. It looks like the > prior implementation failed to handle links due to being based on file > path, given cpp_simplify_pathname. Do you have thoughts on the use if > device ID + inode as a way

Re: #pragma once behavior

2024-09-05 Thread Andrew Pinski via Gcc
On Thu, Sep 5, 2024 at 10:04 PM Jeremy Rifkin wrote: > > Hello, > > I'm looking at #pragma once behavior among the major C/C++ compilers as > part of a proposal paper for standardizing #pragma once. (This is > apparently a very controversial topic) > > To put my question up-front: Would GCC ever b

Re: Fixing dormant bugs in obstack code

2024-08-28 Thread Andrew Pinski via Gcc
On Wed, Aug 28, 2024 at 2:37 PM David Malcolm via Gcc wrote: > > I've been debugging a use-immediately-after-free bug involving obstacks > (the bug isn't in trunk; I found it whilst testing one of my patches). > > It was only visible as a crash when it happened that the call to > obstack_free led

Re: [RFC] Summary of libgomp failures for offloading to nvptx from AArch64

2024-08-11 Thread Andrew Pinski via Gcc
On Sun, Aug 11, 2024 at 11:36 PM Prathamesh Kulkarni via Gcc wrote: > > > > > -Original Message- > > From: Richard Biener > > Sent: Monday, July 29, 2024 7:18 PM > > To: Prathamesh Kulkarni > > Cc: gcc@gcc.gnu.org > > Subject: Re: [RFC] Summary of libgomp failures for offloading to nvptx

Re: How to add an additional option to dg-compile and dg-run

2024-07-29 Thread Andrew Pinski via Gcc
On Mon, Jul 29, 2024 at 1:20 AM Thomas Koenig wrote: > > Hi, > > for the fortran-unsigned branch, I would like to be able to run all > existing Fortran tests also with -funsigned, to make sure the option > does not break anything on existing code. > > Question is: How? > > I came as far as > > $ m

Re: LoongArch incorrect codegen for std::byte_swap

2024-07-27 Thread Andrew Pinski via Gcc
On Sat, Jul 27, 2024 at 3:37 PM pifminns deettnta via Gcc wrote: > > using uint_least64_t = __UINT_LEAST64_TYPE__; > > uint_least64_t testbswap(uint_least64_t a) noexcept > { >return __builtin_bswap64(a); > } > > clang: > https://godbolt.org/z/z8GTsazf4 > > > _Z9testbswapm: >revb.d $a

Re: Question about enabling additional flags in Ofast

2024-07-13 Thread Andrew Pinski via Gcc
On Sat, Jul 13, 2024 at 9:38 AM Hanke Zhang via Gcc wrote: > > Hi, > > I'm attempting to enable more flags in Ofast, but I've encountered some > issues. I suspect you need to handle this in the driver specs instead of in opts.cc. Since -flto-partition=one is more of a global flag rather than an

Re: [EXTERNAL] Re: g++12 broke my system of overloaded operator<

2024-07-12 Thread Andrew Pinski via Gcc
On Fri, Jul 12, 2024 at 12:10 PM Dalbey, Keith via Gcc wrote: > > The means by which this FIX was implemented caused OTHER problems > > template > std::ostream& operator<<(std::ostream& os, const std::pair& pr) > { > os << "(" << pr.first << ", " << pr.second << ")"; > return os;

Re: Help with vector cost model

2024-07-11 Thread Andrew Pinski via Gcc
On Thu, Jul 11, 2024 at 2:14 AM Richard Biener wrote: > > On Thu, Jul 11, 2024 at 10:58 AM Richard Sandiford > wrote: > > > > Andrew Pinski writes: > > > I need some help with the vector cost model for aarch64. > > > I am adding V2HI and V4QI mode support by emulating it using the > > > native V

Re: g++12 broke my system of overloaded operator<

2024-07-11 Thread Andrew Pinski via Gcc
On Thu, Jul 11, 2024 at 5:04 PM Dalbey, Keith via Gcc wrote: > > So I'm on redhat 7 and just got devtoolsset-12 and code (a system of > overloaded<< operators) that was working with devtoolset-10 now break > (because of ordering) > > To not bury the lead.. > > My code relies on the version 11 or

Help with vector cost model

2024-07-10 Thread Andrew Pinski via Gcc
I need some help with the vector cost model for aarch64. I am adding V2HI and V4QI mode support by emulating it using the native V4HI/V8QI instructions (similarly to mmx as SSE is done). The problem is I am running into a cost model issue with gcc.target/aarch64/pr98772.c (wminus is similar to gcc.

Re: consistent unspecified pointer comparison

2024-06-27 Thread Andrew Pinski via Gcc
On Thu, Jun 27, 2024 at 11:57 AM Jason Merrill via Gcc wrote: > > On Thu, Jun 27, 2024 at 2:38 PM Richard Biener > wrote: > > > Am 27.06.2024 um 19:04 schrieb Jason Merrill via Gcc : > > > > > > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2434r1.html > > > proposes to require that

Straw poll on shifts with out of range operands

2024-06-25 Thread Andrew Pinski via Gcc
I am in the middle of improving the isolation path pass for shifts with out of range operands. There are 3 options we could do really: 1) isolate the path to __builtin_unreachable 2) isolate the path to __builtin_trap This is what is currently done for null pointer and divide by zero 3) isolate

Re: gcc 12.4 release archive?

2024-06-22 Thread Andrew Pinski via Gcc
On Sat, Jun 22, 2024 at 3:19 AM Liviu Ionescu wrote: > > Hi, > > GCC 12.4 was released two days ago, but I could not yet find the release > archive at https://ftp.gnu.org/gnu/gcc/. > > Could you upload it? It is located at https://gcc.gnu.org/ftp/gcc/releases/gcc-12.4.0/ . Looks like it was no

Re: GCC trouble in dump_printf_loc

2024-06-03 Thread Andrew Pinski via Gcc
On Mon, Jun 3, 2024 at 2:54 AM weizhe wang via Gcc wrote: > > Hi Guys, > > > > I got some issues in debugging GCC. > > I want to use dump_printf_loc to dump some debug message in GCC. I find > the fopt-info-all option which can enable some dump_printf_loc calls. > > But some dump_p

Re: Is fcommon related with performance optimization logic?

2024-05-29 Thread Andrew Pinski via Gcc
On Wed, May 29, 2024 at 7:13 PM 赵海峰 via Gcc wrote: > > Dear Sir/Madam, > > > We found that running on intel SPR UnixBench compiled with gcc 10.3 performs > worse than with gcc 8.5 for dhry2reg benchmark. > > > I found it related with -fcommon option which is disabled in 10.3 by default. > Fcommo

[RFC] New optab for `a&~b` (and future expand improvements)

2024-05-15 Thread Andrew Pinski via Gcc
Hi all, This is an RFC more than anything and I will be implementing the ideas here. So thinking about how to improve code generation in general and depend less on RTL passes (like combine) to do some instruction selection. So there are 2 ways of implementing this but both involve adding optab

Re: Tests of gcc development beyond its testsuite (in this case, for gfortran)

2024-05-07 Thread Andrew Pinski via Gcc
On Tue, May 7, 2024 at 11:31 AM Toon Moene wrote: > > On 5/7/24 00:02, Toon Moene wrote: > > > OK, perhaps on the aarch64 I need the following option to make the > > comparison fair: > > > > ‘rdma’ > > > > Enable Round Double Multiply Accumulate instructions. This is on by > > default for -ma

Re: Tests of gcc development beyond its testsuite (in this case, for gfortran)

2024-05-06 Thread Andrew Pinski via Gcc
On Mon, May 6, 2024 at 2:27 PM Toon Moene wrote: > > I have now, for some time, ran LAPACK's test programs on my gcc/gfortran > builds on both on the x86_64-linux-gnu architecture, as well as the > aarch64-linux-gnu one (see, e.g., > http://moene.org/~toon/lapack-amd64-gfortran13-O3). > > The resu

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-29 Thread Andrew Pinski via Gcc
On Mon, Apr 29, 2024 at 4:26 PM Lucier, Bradley J via Gcc wrote: > > The question: How to interpret scheduling info with the compiler listed below. > > Specifically, a tight loop that was reported to be scheduled in 23 cycles (as > I understand it) actually executes in a little over 2 cycles per

Re: Build errors for older versions

2024-04-25 Thread Andrew Pinski via Gcc
On Thu, Apr 25, 2024 at 4:21 AM Stefan Schulze Frielinghaus via Gcc wrote: > > Hi all, > > while bisecting I recently ran into build errors like > > In file included from /devel/gcc/libgcc/../gcc/tsystem.h:101, > from /devel/gcc/libgcc/libgcov.h:42, > from /devel/

Re: [RFC] Linux system call builtins

2024-04-08 Thread Andrew Pinski via Gcc
On Mon, Apr 8, 2024 at 11:20 AM Paul Iannetta via Gcc wrote: > > Hi, > > On Mon, Apr 08, 2024 at 06:19:14AM -0300, Matheus Afonso Martins Moreira via > Gcc wrote: > > Hello! I'm a beginner when it comes to GCC development. > > I want to learn how it works and start contributing. > > Decided to st

Re: Is --as-needed the default these days?

2024-03-24 Thread Andrew Pinski via Gcc
On Sun, Mar 24, 2024 at 11:54 AM Yuri Kanivetsky via Gcc wrote: > > > That's a linker option, and the linker is not part of GCC. Any change in > > linker behaviour is not because of a change in GCC. > > Have you noticed what gcc does? Upstream GCC does (still) not default to adding `--as-needed`

Re: int8_t lives matter

2023-12-22 Thread Andrew Pinski via Gcc
On Fri, Dec 22, 2023 at 1:54 PM Olavi Esker via Gcc wrote: > > Hello, > > #include > #include > > int main() > { > std::int8_t myInt{65}; > myInt += 1; > std::cout << myInt; > } > > Guess what this returns? > Character "B". > > int main() > { > std::int8_t myInt{}; > std::cin >> myInt; > std::co

Re: Deprecating -fgnu-tm support for GCC 14 and removing it for GCC 15

2023-12-17 Thread Andrew Pinski via Gcc
On Sun, Dec 17, 2023 at 1:20 PM Eric Gallager wrote: > > On Sat, Dec 16, 2023 at 3:16 PM Andrew Pinski via Gcc wrote: > > > > -fgnu-tm support has not been improved since GCC 5 or earlier. It is > > not even supported with LTO. Does it make sense to deprecate the &g

Re: Deprecating -fgnu-tm support for GCC 14 and removing it for GCC 15

2023-12-17 Thread Andrew Pinski via Gcc
On Sun, Dec 17, 2023 at 8:26 AM Florian Weimer wrote: > > * Andrew Pinski via Gcc: > > > -fgnu-tm support has not been improved since GCC 5 or earlier. It is > > not even supported with LTO. Does it make sense to deprecate the > > support for GCC 14 and remove it in GC

Deprecating -fgnu-tm support for GCC 14 and removing it for GCC 15

2023-12-16 Thread Andrew Pinski via Gcc
-fgnu-tm support has not been improved since GCC 5 or earlier. It is not even supported with LTO. Does it make sense to deprecate the support for GCC 14 and remove it in GCC 15? Thanks, Andrew Pinski

Re: Switching x86_64-linux-gnu to GNU2 TLS descriptors by default

2023-12-13 Thread Andrew Pinski via Gcc
On Wed, Dec 13, 2023 at 1:08 PM Andrew Pinski wrote: > > On Wed, Dec 13, 2023 at 6:19 AM Florian Weimer via Gcc > wrote: > > > > I feel like I have asked this before. Currently, GCC uses calls to > > __tls_get_addr to obtain the address of global-dynamic TLS variables. > > On other architecture

Re: Switching x86_64-linux-gnu to GNU2 TLS descriptors by default

2023-12-13 Thread Andrew Pinski via Gcc
On Wed, Dec 13, 2023 at 6:19 AM Florian Weimer via Gcc wrote: > > I feel like I have asked this before. Currently, GCC uses calls to > __tls_get_addr to obtain the address of global-dynamic TLS variables. > On other architectures with support for GNU2 TLS descriptors, those are > used by default.

Deprecating nds32-*-linux-* target for GCC 14 (and removing it for GCC 15)

2023-12-11 Thread Andrew Pinski via Gcc
nds32 support in Linux was removed last year: https://www.phoronix.com/news/Andes-Tech-NDS32-Removal The support for glibc never made it upstream as far as I can tell either. What are others thoughts on this? Thanks, Andrew Pinski

Re: wwwdocs: cxx-reflection/index.html Standardeze

2023-12-02 Thread Andrew Pinski via Gcc
On Sat, Dec 2, 2023 at 5:40 PM Jonny Grant wrote: > > Hello > > I held of making a patch to change this (to remove it), does Standardeze mean > something: > > https://gcc.gnu.org/projects/cxx-reflection/index.html It means written in the same form as the language that is the C++ standard. It is

Re: [ARM] unexpected sizeof() of a complex packed type

2023-11-17 Thread Andrew Pinski via Gcc
On Thu, Nov 16, 2023 at 8:42 AM Dmitry Antipov wrote: > > (The following sample is taken from my LKML post at > https://lkml.org/lkml/2023/11/15/213) > > $ cat t-build-bug.c > > struct vring_tx_mac { > unsigned int d[3]; > unsigned int ucode_cmd; > } __attribute__((packed)); > > s

Re: Lots of FAILs in gcc.target/riscv/rvv/autovec/*

2023-11-07 Thread Andrew Pinski via Gcc
On Tue, Nov 7, 2023 at 8:33 PM Maxim Blinov via Gcc wrote: > > I see, thanks for clarifying, that makes sense. > > In that case, what about doing the inverse? I mean, are there unique > patches in the vendor branch, and would it be useful to try to > upstream them into master? My motivation is to

Re: Emacs ChangeLog generation and commit messages

2023-11-06 Thread Andrew Pinski via Gcc
On Mon, Nov 6, 2023 at 8:39 AM Florian Weimer via Gcc wrote: > > Emacs has a very useful facility. You press “C-x 4 a” in a place where > you make changes, and the editor automatically opens the right ChangeLog > file and adds a draft entry to it, like this: > > 2023-11-06 Florian Weimer > >

Re: Advice on how to disable floating point instructions

2023-11-04 Thread Andrew Pinski via Gcc
On Sat, Nov 4, 2023 at 9:41 AM Enrico via Gcc wrote: > > Hello, > > > for a custom architecture I am working on, I would like to entirely disable > the usage of hardware floating point instructions in favor of library > methods on demand. > > I need advice on what is the best strategy to do this.

Re: Question on GIMPLE shifts

2023-11-01 Thread Andrew Pinski via Gcc
On Wed, Nov 1, 2023 at 3:56 AM Daniil Frolov wrote: > > Hi! > > When investigating bit shifts I got an incomprehensible moment with > the following example: > > int f(int x, int k) > { > int tmp = x >> k; > return (tmp & 1) << 10; > } > > If we would like to take a look into GIMPLE then

Re: Need some analyzer testcase help

2023-10-27 Thread Andrew Pinski via Gcc
On Fri, Oct 27, 2023 at 2:12 PM David Malcolm wrote: > > On Fri, 2023-10-27 at 12:48 -0700, Andrew Pinski wrote: > > Hi David and others, > > I am in the process of improving phi-opt and moving what was > > handled > > in value_replacement to match-and-simplify and ran into a few > > failures >

Need some analyzer testcase help

2023-10-27 Thread Andrew Pinski via Gcc
Hi David and others, I am in the process of improving phi-opt and moving what was handled in value_replacement to match-and-simplify and ran into a few failures in the analyzer testsuite. For an example c-c++-common/analyzer/inlining-3-multiline.c (and c-c++-common/analyzer/inlining-3.c) now fail

Re: Install page misses Bison prerequisite

2023-10-26 Thread Andrew Pinski via Gcc
On Thu, Oct 26, 2023 at 11:01 AM Simon Sobisch via Gcc wrote: > > https://gcc.gnu.org/install/prerequisites.html has a bunch of tools > under "Tools/packages necessary for modifying GCC", but GNU Bison is > missing. > > I found it interesting to see that some files like under intl say > 1 /* A

Re: Install page misses Bison prerequisite

2023-10-26 Thread Andrew Pinski via Gcc
Looks like it was removed on accident here: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/doc/install.texi;h=3bf2305c8d14181bfb61d112ab3e1c0c2f605322;hp=5735f054317e08b2c5b629adfe72a308459b8bd9;hb=e8645a4001a8d117dd336ea75942aac49101af49;hpb=3825be8c96775cf8e6fcb5eef04455f07717a5ea But it is

Re: Question about gimple code during optimizing if-conversion

2023-10-14 Thread Andrew Pinski via Gcc
On Fri, Oct 13, 2023 at 10:16 PM Hanke Zhang via Gcc wrote: > > Hi, I'm working on optimizing if-conversion for my own business > recently. I got a problem here. > > I tried to optimize it in such a case, for example, when a conditional > statement block has only if statement and no else statement

Re: Test with an lto-build of libgfortran.

2023-09-27 Thread Andrew Pinski via Gcc
On Wed, Sep 27, 2023 at 11:28 PM Richard Biener via Fortran wrote: > > On Wed, Sep 27, 2023 at 11:48 PM Jeff Law via Fortran > wrote: > > > > > > > > On 9/27/23 12:21, Toon Moene wrote: > > > > > > > > The lto-ing of libgfortran did succeed, because I did get a new warning: > > > > > > gfortran -

Re: ipa-inline & what TARGET_CAN_INLINE_P can assume

2023-09-25 Thread Andrew Pinski via Gcc
On Mon, Sep 25, 2023 at 10:16 AM Richard Sandiford via Gcc wrote: > > Hi, > > I have a couple of questions about what TARGET_CAN_INLINE_P is > alllowed to assume when called from ipa-inline. (Callers from the > front-end don't matter for the moment.) > > I'm working on an extension where a functi

Re: Question on -fwrapv and -fwrapv-pointer

2023-09-18 Thread Andrew Pinski via Gcc
On Mon, Sep 18, 2023 at 12:33 AM Richard Biener via Gcc wrote: > > On Sat, Sep 16, 2023 at 10:38 AM Martin Uecker via Gcc > wrote: > > > > > > > > (moved to gcc@) > > > > > On Fri, Sep 15, 2023 at 08:18:28AM -0700, Andrew Pinski wrote: > > > > On Fri, Sep 15, 2023 at 8:12 AM Qing Zhao wrote: >

Re: Compilation Error Regarding RID_MAX

2023-09-13 Thread Andrew Pinski via Gcc
On Wed, Sep 13, 2023 at 9:35 PM Ken Matsui wrote: > > On Wed, Sep 13, 2023 at 9:23 PM Andrew Pinski wrote: > > > > On Wed, Sep 13, 2023 at 9:09 PM Ken Matsui via Gcc wrote: > > > > > > Hi, > > > > > > I have merged all my patches into a single branch for better > > > maintainability for me, but

Re: Compilation Error Regarding RID_MAX

2023-09-13 Thread Andrew Pinski via Gcc
On Wed, Sep 13, 2023 at 9:09 PM Ken Matsui via Gcc wrote: > > Hi, > > I have merged all my patches into a single branch for better > maintainability for me, but I am unable to build GCC. Initially, I > faced an error related to RID_MAX, which was fixed in > https://github.com/ken-matsui/gcc-gsoc23

Using ranger from cfgexpand

2023-09-02 Thread Andrew Pinski via Gcc
Hi, I was trying to use the ranger from inside of cfgexpand but since at this point we have a mix of RTL and gimple basic blocks, things fall over very fast. First does it make sense to use the ranger from expand or should we change the gimple IR in isel instead if we have a better way of doing

Re: vect_recog_mixed_size_cond_pattern dead code now

2023-08-30 Thread Andrew Pinski via Gcc
On Wed, Aug 30, 2023 at 12:26 AM Richard Biener wrote: > > On Tue, 29 Aug 2023, Andrew Pinski wrote: > > > Hi, > > I was reading some code in tree-vect-patterns.cc and I came across > > vect_recog_mixed_size_cond_pattern . The code tries to handle > > comparisons from COND_EXPR but that cannot h

vect_recog_mixed_size_cond_pattern dead code now

2023-08-29 Thread Andrew Pinski via Gcc
Hi, I was reading some code in tree-vect-patterns.cc and I came across vect_recog_mixed_size_cond_pattern . The code tries to handle comparisons from COND_EXPR but that cannot happen any more (after r13-707-g68e0063397ba82). Should this code be removed now? Thanks, Andrew

Re: There Might a Bug in the Compiler: When Calling Weak Defined Function

2023-08-07 Thread Andrew Pinski via Gcc
On Mon, Aug 7, 2023 at 8:52 AM Şahin Duran via Gcc wrote: > > Dear GCC Developers, > > I think I've just discovered a bug/ undefined situation in the compiler. > When I try to call a weakly defined function, compiler successfully > generates the code of calling procedure. However, this calling pro

Re: /home/toon/compilers/gcc/libgfortran/generated/matmul_i1.c:1781:1: internal compiler error: RTL check: expected elt 0 type 'i' or 'n', have 'w' (rtx const_int) in vpternlog_redundant_operand_mask,

2023-08-06 Thread Andrew Pinski via Gcc
On Sun, Aug 6, 2023 at 7:41 PM Hongtao Liu via Gcc wrote: > > On Mon, Aug 7, 2023 at 9:38 AM Hongtao Liu wrote: > > > > On Mon, Aug 7, 2023 at 9:35 AM Hongtao Liu wrote: > > > > > > On Mon, Aug 7, 2023 at 2:08 AM Toon Moene wrote: > > > > > > > > Wonder if I am the only one to see this: > > > >

Re: Add clang's invalid-noreturn warning flag

2023-07-31 Thread Andrew Pinski via Gcc
On Mon, Jul 31, 2023 at 8:18 PM Julian Waters via Gcc wrote: > > Please review a patch to add clang's invalid-noreturn flag to toggle > noreturn warnings. This patch keeps the old behaviour of always warning on > every noreturn violation, but unlike clang also adds an extra layer of fine > tuning

Re: [C++] [Coroutines] Does GCC want to support `-fno-coroutines`?

2023-07-27 Thread Andrew Pinski via Gcc
On Thu, Jul 27, 2023 at 7:11 PM chuanqi.xcq via Gcc wrote: > > Hi, > We're discussing to implement `-fno-coroutines` in clang so that we can > disable the coroutine feature with C++ standard higher than 20. > A full discussion can be found here: https://reviews.llvm.org/D156247. A > major motiv

Re: Enum processor_features adding on i386 backend

2023-07-18 Thread Andrew Pinski via Gcc
On Tue, Jul 18, 2023 at 7:50 PM Jiang, Haochen via Gcc wrote: > > Hi all, > > As you all know that we are continuously working on new ISA implementation > for i386 backend. > > There is one thing that I am really curious about when I read the code. > > In gcc/config/i386/i386-cpuinfo.h, we have s

Re: Tiny asm (continued)

2023-07-09 Thread Andrew Pinski via Gcc
On Sun, Jul 9, 2023 at 11:24 PM jacob navia wrote: > > Hi > The assembler checks at each instruction if the instruction is within the > selected subset of risc-v extensions or not. I do not quite understand why > this check is done here. > > I suppose that gcc, before emitting any instruction do

Re: Warning specifically for a returning noreturn

2023-07-04 Thread Andrew Pinski via Gcc
On Tue, Jul 4, 2023 at 6:32 PM Julian Waters wrote: > > Hi Andrew, thanks for the quick response, > > What if the method has a return value? I know it sounds counterintuitive, but > in some places HotSpot relies on the noreturn attribute being applied to > methods that do return a value in an un

Re: Warning specifically for a returning noreturn

2023-07-04 Thread Andrew Pinski via Gcc
On Tue, Jul 4, 2023 at 5:54 PM Julian Waters via Gcc wrote: > > Hi all, > > Currently to disable the warning that a noreturn method does return, it's > required to disable warnings entirely. This can be very inconvenient when > -Werror is enabled with a noreturn method that isn't specifically call

Re: Mapping of TREE_CODE to tree_node

2023-07-02 Thread Andrew Pinski via Gcc
On Sun, Jul 2, 2023 at 5:48 PM Aaron Lorey via Gcc wrote: > > Am Mo., 26. Juni 2023 um 20:09 Uhr schrieb David Malcolm > : > > > > On Mon, 2023-06-26 at 18:59 +0200, Aaron Lorey via Gcc wrote: > > > Hello, > > > > > > this is the first time I am writing to a mailing list. I've tried > > > researc

Re: types in GIMPLE IR

2023-06-29 Thread Andrew Pinski via Gcc
On Thu, Jun 29, 2023 at 12:10 PM Krister Walfridsson via Gcc wrote: > > On Thu, 29 Jun 2023, Richard Biener wrote: > > > IIRC we have some simplification rules that turn bit operations into > > arithmetics. Arithmetic is allowed if it keeps the values inside > > [-1,0] for signed bools or [0, 1]

Re: [PATCH] Basic asm blocks should always be volatile

2023-06-28 Thread Andrew Pinski via Gcc
On Wed, Jun 28, 2023 at 8:04 AM Michael Matz wrote: > > Hello, > > On Wed, 28 Jun 2023, Julian Waters via Gcc wrote: > > > On the contrary, code compiled with gcc with or without the applied patch > > operates very differently, with only gcc with the applied patch producing a > > fully correctly o

Re: [PATCH] Basic asm blocks should always be volatile

2023-06-28 Thread Andrew Pinski via Gcc
On Wed, Jun 28, 2023 at 12:32 AM Julian Waters wrote: > > Hi Andrew, > > On a Microsoft Windows target the following (placed inside a function of > course) will only work correctly if volatile is specified in the basic asm > block (or if the attached patch was applied to gcc): These inline-asm

Re: [PATCH] Basic asm blocks should always be volatile

2023-06-27 Thread Andrew Pinski via Gcc
On Tue, Jun 27, 2023 at 9:16 AM Julian Waters wrote: > > Perhaps this only affects compilation when GIMPLE isn't being used? The only time GIMPLE is not used is if you supply -fsyntax-only so ... Thanks, Andrew > > On Wed, Jun 28, 2023 at 12:15 AM Julian Waters > wrote: >> >> Hi Andrew, >> >>

Re: [PATCH] Basic asm blocks should always be volatile

2023-06-27 Thread Andrew Pinski via Gcc
On Tue, Jun 27, 2023 at 9:15 AM Julian Waters wrote: > > Hi Andrew, > > That can't be right, on my system a test of asm vs asm volatile with -O3 and > -flto=auto yields very different results, with only the latter being correct. > The patch fixed it and caused gcc to emit correct assembly Can y

Re: [PATCH] Basic asm blocks should always be volatile

2023-06-27 Thread Andrew Pinski via Gcc
On Tue, Jun 27, 2023 at 9:03 AM Julian Waters via Gcc wrote: > > gcc's documentatation mentions that all basic asm blocks are always volatile, > yet the parser fails to account for this by only ever setting > volatile_p to true > if the volatile qualifier is found. This patch fixes this by adding

Re: Mapping of TREE_CODE to tree_node

2023-06-26 Thread Andrew Pinski via Gcc
On Mon, Jun 26, 2023 at 10:01 AM Aaron Lorey via Gcc wrote: > > Hello, > > this is the first time I am writing to a mailing list. I've tried > researching the normal procedure but nothing special seems to be required. > > I'm currently trying to do a complete graph-discovery of GCC's symtab / > tr

Re: Passing the complex args in the GPR's

2023-06-06 Thread Andrew Pinski via Gcc
On Tue, Jun 6, 2023 at 8:05 AM Umesh Kalappa wrote: > > Hi Adnrew, > Thank you for the quick response and for PPC64 too ,we do have > mismatches in ABI b/w complex operations like > https://godbolt.org/z/bjsYovx4c . > > Any reason why GCC chose to use GPR 's here ? Yes because it was set before 2

Re: Passing the complex args in the GPR's

2023-06-06 Thread Andrew Pinski via Gcc
On Tue, Jun 6, 2023 at 7:50 AM Umesh Kalappa via Libc-alpha wrote: > > Hi all , > > For the test case https://godbolt.org/z/vjs1vfs5W ,we see the mismatch > in the ABI b/w gcc and clang . > > Do we have any supporting documents that second the GCC behaviour over CLANG ? > > EABI states like > > In

Re: Who cares about performance (or Intel's CPU errata)?

2023-05-27 Thread Andrew Pinski via Gcc
On Sat, May 27, 2023 at 3:54 PM Stefan Kanthak wrote: > > "Andrew Pinski" wrote: > > > On Sat, May 27, 2023 at 2:25 PM Stefan Kanthak > > wrote: > >> > >> Just to show how SLOPPY, INCONSEQUENTIAL and INCOMPETENT GCC's developers > >> are: > >> > >> --- dontcare.c --- > >> int ispowerof2(unsign

Re: Who cares about performance (or Intel's CPU errata)?

2023-05-27 Thread Andrew Pinski via Gcc
On Sat, May 27, 2023 at 2:25 PM Stefan Kanthak wrote: > > Just to show how SLOPPY, INCONSEQUENTIAL and INCOMPETENT GCC's developers are: > > --- dontcare.c --- > int ispowerof2(unsigned __int128 argument) { > return __builtin_popcountll(argument) + __builtin_popcountll(argument >> > 64) == 1;

Re: Another epic optimiser failure

2023-05-27 Thread Andrew Pinski via Gcc
On Sat, May 27, 2023 at 2:38 PM Stefan Kanthak wrote: > > "Jakub Jelinek" wrote, completely clueless: > > > On Sat, May 27, 2023 at 11:04:11PM +0200, Stefan Kanthak wrote: > >> OUCH: popcnt writes the WHOLE result register, there is ABSOLUTELY > >> no need to clear it beforehand nor to clea

Re: Will GCC eventually support SSE2 or SSE4.1?

2023-05-26 Thread Andrew Pinski via Gcc
On Thu, May 25, 2023 at 11:56 PM Stefan Kanthak wrote: > > Hi, > > compile the following function on a system with Core2 processor > (released January 2008) for the 32-bit execution environment: > > --- demo.c --- > int ispowerof2(unsigned long long argument) > { > return (argument & argument

Re: libsanitizer: sync from master

2023-04-30 Thread Andrew Pinski via Gcc
On Tue, Nov 15, 2022 at 7:47 AM Martin Liška wrote: > > Hi. > > I've just pushed libsanitizer update that was tested on x86_64-linux and > ppc64le-linux systems. > Moreover, I run bootstrap on x86_64-linux and checked ABI difference with > abidiff. This broke hwasan on aarch64. See https://gcc.

Re: Hosting our gfortran MatterMost workspace

2023-04-28 Thread Andrew Pinski via Gcc
On Fri, Apr 28, 2023 at 8:32 AM Jerry D via Fortran wrote: > > Hello all and gcc overseers, > > I received a notice that the MasterMost server providers decided to drop > their free service. Unfortunate and understandable. > > I plan to contact the Open Software Lab folks at Oregon State Universit

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

2023-04-10 Thread Andrew Pinski via Gcc
On Mon, Apr 10, 2023 at 12:16 AM Julian Waters via Gcc wrote: > > Hi all, > > When trying to compile gcc with the revamped WIN32 threading model which > supports C++11 threads, libstdc++ always fails to link with the following > error: those functions should have been included in newly built libg

MIN/MAX and trapping math and NANs

2023-04-01 Thread Andrew Pinski via Gcc
Hi, I noticed while working on phi-opt, that MIN/MAX EXPR (and the corresponding RTL codes) both can return true for trapping even if NANs are not honored (that is -ffinite-math-only). Is this true? I would have assumed when -ffinite-math-only -fno-signed-zeros is used, then MIN/MAX would be the

Re: GCC ASAN breaks glob()?

2023-03-26 Thread Andrew Pinski via Gcc
On Sun, Mar 26, 2023 at 12:01 PM Paul Smith wrote: > > OK here's something super-strange I discovered: > > Enabling -faddress=sanitize in GCC, causes the glob(3) function to > misbehave. > > I'm using GCC 11.3 / glibc 2.35 (x86_64 native). I have this simple > program: Maybe https://gcc.gnu.org/

Re: PROBLEM !!! __ OS: ANY LINUX __ COMPILERS: gcc & g++ __ OUTPUT: BAD!!!

2023-03-16 Thread Andrew Pinski via Gcc
On Thu, Mar 16, 2023 at 10:46 AM oszibarack korte via Gcc wrote: > > *An unsolved problem for more than a decade!* > *Dear GNU Compiler Collection development team!* > > *There is a problem with the gcc and g++ compilers for Linux operating > systems!* > *Here are 3 pieces of C and 3 pieces of C++

Re: get_range_query vs NULL argument

2023-02-17 Thread Andrew Pinski via Gcc
On Wed, Feb 15, 2023 at 2:30 PM Andrew MacLeod wrote: > > > On 2/15/23 14:50, Andrew Pinski wrote: > > Hi, > >While fixing PR 108354, I came across that > > ssa_name_has_boolean_range calls get_range_query with cfun as the > > argument but sometimes while in IPA passes cfun is currently nullpt

get_range_query vs NULL argument

2023-02-15 Thread Andrew Pinski via Gcc
Hi, While fixing PR 108354, I came across that ssa_name_has_boolean_range calls get_range_query with cfun as the argument but sometimes while in IPA passes cfun is currently nullptr. The question should we check the argument before calling get_range_query or is it a valid thing to call it with a

Re: [PATCH v5 0/5] P1689R5 support

2023-02-02 Thread Andrew Pinski via Gcc
On Wed, Jan 25, 2023 at 1:07 PM Ben Boeckel via Fortran wrote: > > Hi, > > This patch series adds initial support for ISO C++'s [P1689R5][], a > format for describing C++ module requirements and provisions based on > the source code. This is required because compiling C++ with modules is > not emb

Re: B^HDEAD code generation (AMD64)

2023-01-09 Thread Andrew Pinski via Gcc
On Mon, Jan 9, 2023 at 4:42 PM Stefan Kanthak wrote: > > "Thomas Koenig" wrote: > > > On 09.01.23 12:35, Stefan Kanthak wrote: > >> 20 superfluous instructions of the total 102 instructions! > > > > The proper place for bug reports is https://gcc.gnu.org/bugzilla/ . > > OUCH: there's NO proper pl

Re: Document how to build PGO-optimized GCC version

2022-12-27 Thread Andrew Pinski via Gcc
On Tue, Dec 27, 2022 at 9:38 PM Alexander Zaitsev wrote: > > Hello. > > We are using GCC for our C++ projects. Our projects are huge, commit > rate is quite huge, so our CI workers are always busy (so as any other > CI workers, honestly). Since we want to increase build speed, one of the > option

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Andrew Pinski via Gcc
On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: > > Hi, > > I was rewriting the strncat(3) manual page, and when I tried to compile the > example program, I got a surprise from the compiler. > > Here goes the page: > > >strncat(3) Library Functions Manual

Re: [BUG] missing warning for pointer arithmetic out of bounds

2022-12-13 Thread Andrew Pinski via Gcc
On Tue, Dec 13, 2022 at 11:16 AM Alejandro Colomar via Gcc wrote: > > > > On 12/13/22 20:08, Alejandro Colomar wrote: > > Hi! > > > > For the following program: > > > > > > $ cat buf.c > > #include > > > > int main(void) > > { > > char *p, buf[5]; > > > > p =

Re: Bug with GCC's handling of lifetimes of implicit-lifetime types

2022-12-10 Thread Andrew Pinski via Gcc
On Sat, Dec 10, 2022 at 10:36 AM Jonathan Wakely via Gcc wrote: > > On Sat, 10 Dec 2022 at 17:42, Gavin Ray via Gcc wrote: > > > > This came up when I was asking around about what the proper way was to: > > > > - Allocate aligned storage for a buffer pool/page cache > > - Then create pointers to

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

Re: RFC: Make builtin types only valid for some target features

2022-12-05 Thread Andrew Pinski via Gcc
On Sun, Dec 4, 2022 at 11:33 PM Richard Sandiford via Gcc wrote: > > "Kewen.Lin" writes: > > Hi, > > > > I'm working to find one solution for PR106736, which requires us to > > make some built-in types only valid for some target features, and > > emit error messages for the types when the conditi

Re: [PATCH] Various pages: SYNOPSIS: Use VLA syntax in function parameters

2022-12-03 Thread Andrew Pinski via Gcc
On Sat, Dec 3, 2022 at 1:05 PM Alejandro Colomar via Gcc wrote: > > Hi! > > I'll probably have to release again before the Debian freeze of Bookworm. > That's something I didn't want to do, but there's some important bug that > affects downstream projects (translation pages), and I need to release

Re: Can't build Ada

2022-11-25 Thread Andrew Pinski via Gcc
On Fri, Nov 25, 2022 at 12:08 PM Paul Koning wrote: > > > > > On Nov 25, 2022, at 3:03 PM, Andrew Pinski wrote: > > > > On Fri, Nov 25, 2022 at 11:59 AM Paul Koning via Gcc > > wrote: > >> > >> I'm trying to use fairly recent GCC sources (the gcc-darwin branch to be > >> precise) to build Ada,

Re: Can't build Ada

2022-11-25 Thread Andrew Pinski via Gcc
On Fri, Nov 25, 2022 at 11:59 AM Paul Koning via Gcc wrote: > > I'm trying to use fairly recent GCC sources (the gcc-darwin branch to be > precise) to build Ada, starting with the latest (2020) release of Gnat from > Adacore. Are you building a cross compiler or a native compiler? If you are bu

Re: -Warray-bounds interprets int *var as int var[0] ?

2022-11-23 Thread Andrew Pinski via Gcc
On Wed, Nov 23, 2022 at 9:15 AM Georg-Johann Lay wrote: > > The following code throws a warning which I do not understand. > > Purpose is to save and restore SREG, which is a special function > register (SFR) defined by its hardware address as: > > #define SREG (*(volatile uint8_t*) (0x3F + __AVR_

Re: [whish] -Wunterminated-string-initialization: new warning

2022-11-13 Thread Andrew Pinski via Gcc
On Sun, Nov 13, 2022 at 1:57 PM Alejandro Colomar via Gcc wrote: > > Hi! > > I'd like to get warnings if I write the following code: > > char foo[3] = "foo"; This should be easy to add as it is already part of the -Wc++-compat option as for C++ it is invalid code. :2:19: warning: initializer-str

  1   2   >