[PATCH, committed] Fortran: silence Wmaybe-uninitialized warnings for LTO build [PR116221]

2024-08-11 Thread Harald Anlauf
Dear all, I've pushed the attached simple patch for initialization of local variables to silence warnings for LTO builds after Sam James' confirmation as https://gcc.gnu.org/g:2b23a444bcf7eb67cb04b431d8fd4fa6f65222de Thanks, Harald From 2b23a444bcf7eb67cb04b431d8fd4fa6f65222de Mon Sep 17 00:00:

[PATCH][committed] aarch64: Check CONSTM1_RTX in definition of Dm constraint

2024-08-08 Thread Kyrylo Tkachov
Hi all, The constraint Dm is intended to match vectors of minus 1, but actually checks for CONST1_RTX. This doesn't have a bad effect in practice as its only use in the aarch64_wrffr pattern for the setffr instruction which is a VNx16BI operation and -1 and 1 are the same there. That pattern can o

Go patch committed: Don't assume that ATTRIBUTE_UNUSED is defined

2024-08-07 Thread Ian Lance Taylor
This patch to the Go frontend avoids assuming that ATTRIBUTE_UNUSED is defined. While it is defined when building the Go frontend as part of GCC, it is meant to work with other compilers as well. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian e89ddb749517ea

libbacktrace patch committed: Avoid -Wpointer-arith errors

2024-08-05 Thread Ian Lance Taylor
This patch, based on one by Kirill Müller, adds -Wpointer-arith to the libbacktrace warning options, and adds casts to avoid the cases where the warning currently fires. Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * configure.ac (ACX_PROG_CC_WA

Go patch committed: Panic arguments have empty interface type

2024-08-05 Thread Ian Lance Taylor
This patch to the Go frontend determines that panic arguments are empty interfaces. After https://go.dev/cl//536643 passing NULL as the expected type permitted an untyped constant expression to remain untyped. This change will fix them to take on the empty interface type. The panic and print/prin

libbacktrace patch committed: Use __has_attribute for fallthrough

2024-07-18 Thread Ian Lance Taylor
This libbacktrace patch uses __has_attribute for fallthrough. It also fixes some FALLTHROUGH comments to use ATTRIBUTE_FALLTHROUGH. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * internal.h: Use __has_attribute to check for fallthrough attribute. * elf.c

Re: libbacktrace patch committed: Better backtrace_print if no debug info

2024-07-17 Thread Ian Lance Taylor
On Wed, Jul 17, 2024 at 5:40 PM Ian Lance Taylor wrote: > > This libbacktrace patch improves backtrace_print when there is no > debug info. It falls back to calling backtrace_syminfo, and uses that > to print an offset from a symbol if it can. This is a partial fix for > https://github.com/ianla

libbacktrace patch committed: Better backtrace_print if no debug info

2024-07-17 Thread Ian Lance Taylor
This libbacktrace patch improves backtrace_print when there is no debug info. It falls back to calling backtrace_syminfo, and uses that to print an offset from a symbol if it can. This is a partial fix for https://github.com/ianlancetaylor/libbacktrace/issues/59. Bootstrapped and ran libbacktrace

libbacktrace patch committed: Mention dl_iterate_phdr in README

2024-07-17 Thread Ian Lance Taylor
This patch adds some notes about dl_iterate_phdr to the libbacktrace README file. In general dl_iterate_phdr is not async-signal-safe and does call malloc, so programs that want to use libbacktrace functions from a signal handler or within malloc must make an initiali libbacktrace call in order to

libbacktrace patch committed: Avoid infinite recursion

2024-07-11 Thread Ian Lance Taylor
libbacktrace could get an infinite recursion in an odd case in which a .gnu_debugdata section was added to a debug file, and mini_debuginfo was put into the debug file, and the debug file was put into a /usr/lib/debug directory to be found by build ID. This combination doesn't really make sense bu

libbacktrace patch committed: Don't fail if symbol size is unknown

2024-07-11 Thread Ian Lance Taylor
Mach-O and PE/COFF don't record symbol sizes in the symbol table. Adjust the libbacktrace testsuite so that it doesn't fail if the symbol size is unknown, only if it is incorrect. Ran libbacktrace tests on macOS on the compile farm and on x86_64-pc-linux-gnu. Committed to mainline. Ian

libbacktrace patch committed: Correctly gather Mach-O symbols

2024-07-11 Thread Ian Lance Taylor
The libbacktrace symbol table code was incorrectly discarding global Mach-O symbols. This patch fixes the problem. Tested on macOS on the compile farm, and also on x86_64-pc-linux-gnu. Committed to mainline. Ian For PR libbacktrace/97082 * macho.c (MACH_O_N_EXT): Don't

Re: libbacktrace patch committed: Add clang optnone attribute

2024-07-11 Thread Eric Gallager
On Thu, Jul 11, 2024 at 7:19 PM Andrew Pinski wrote: > > On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote: > > > > The libbacktrace testsuite was not passing when run with current > > versions of clang. Add the optnone attribute to make it pass. Add > > -Wno-attributes and -Wno-unknown-at

Re: libbacktrace patch committed: Add clang optnone attribute

2024-07-11 Thread Ian Lance Taylor
On Thu, Jul 11, 2024 at 4:18 PM Andrew Pinski wrote: > > On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote: > > > > The libbacktrace testsuite was not passing when run with current > > versions of clang. Add the optnone attribute to make it pass. Add > > -Wno-attributes and -Wno-unknown-at

Re: libbacktrace patch committed: Add clang optnone attribute

2024-07-11 Thread Andrew Pinski
On Thu, Jul 11, 2024 at 4:14 PM Ian Lance Taylor wrote: > > The libbacktrace testsuite was not passing when run with current > versions of clang. Add the optnone attribute to make it pass. Add > -Wno-attributes and -Wno-unknown-attributes to disable warnings about > unrecognized function attribu

libbacktrace patch committed: Add clang optnone attribute

2024-07-11 Thread Ian Lance Taylor
The libbacktrace testsuite was not passing when run with current versions of clang. Add the optnone attribute to make it pass. Add -Wno-attributes and -Wno-unknown-attributes to disable warnings about unrecognized function attributes. Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linu

libbacktrace patch committed: Suggest -g if no debug info

2024-07-11 Thread Ian Lance Taylor
This small libbacktrace patch suggests compiling with -g (and, on macOS, running dsymutil), if there is no debug info. Ran libbacktrace testsuite. Committed to mainline. Ian * elf.c (elf_nodebug): Suggest -g. * macho.c (macho_nodebug): Suggest -g and dsymutil.

libbacktrace patch committed: Remove trailing whitespace

2024-07-11 Thread Ian Lance Taylor
This minor libbacktrace patch removes trailing whitespace. Ran libbacktrace tests. Committed to mainline. Ian * dwarf.c: Remove trailing whitespace. * macho.c: Likewise. 3f660179d6a0ebcd83d6a546f48a163d1a685f72 diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c index ed067

[PATCH][committed][testsuite]: Update test for PR115537 to use SVE .

2024-07-04 Thread Tamar Christina
Hi All, The PR was about SVE codegen, the testcase accidentally used neoverse-n1 instead of neoverse-v1 as was the original report. This updates the tool options. Regtested on aarch64-none-linux-gnu and no issues. committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog:

[PATCH] [committed] Use __builtin_cpu_support instead of __get_cpuid_count.

2024-07-03 Thread liuhongt
>> Hmm, now all avx512 tests SIGILL when testing with -m32: >> >> Dump of assembler code for function __get_cpuid_count: >> => 0x08049500 <+0>:     kmovd  %eax,%k2 >>    0x08049504 <+4>:     kmovd  %edx,%k1 >>    0x08049508 <+8>:     pushf >>    0x08049509 <+9>:     pushf >>    0x0804950a <+10>:  

Re: [PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread Hongtao Liu
On Thu, Jul 4, 2024 at 9:41 AM H.J. Lu wrote: > > > On Thu, Jul 4, 2024, 9:12 AM Hongtao Liu wrote: >> >> On Thu, Jul 4, 2024 at 6:17 AM H.J. Lu wrote: >> > >> > >> > On Wed, Jul 3, 2024, 9:37 PM Richard Biener >> > wrote: >> >> >> >> On Wed, Jul 3, 2024 at 9:25 AM liuhongt wrote: >> >> > >>

Re: [PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread H.J. Lu
On Thu, Jul 4, 2024, 9:12 AM Hongtao Liu wrote: > On Thu, Jul 4, 2024 at 6:17 AM H.J. Lu wrote: > > > > > > On Wed, Jul 3, 2024, 9:37 PM Richard Biener > wrote: > >> > >> On Wed, Jul 3, 2024 at 9:25 AM liuhongt wrote: > >> > > >> > The patch can avoid SIGILL on non-AVX512 machine due to kmovd

Re: [PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread Hongtao Liu
On Thu, Jul 4, 2024 at 6:17 AM H.J. Lu wrote: > > > On Wed, Jul 3, 2024, 9:37 PM Richard Biener > wrote: >> >> On Wed, Jul 3, 2024 at 9:25 AM liuhongt wrote: >> > >> > The patch can avoid SIGILL on non-AVX512 machine due to kmovd is >> > generated in dynamic check. >> > >> > Committed as an obv

Re: [PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread H.J. Lu
On Wed, Jul 3, 2024, 9:37 PM Richard Biener wrote: > On Wed, Jul 3, 2024 at 9:25 AM liuhongt wrote: > > > > The patch can avoid SIGILL on non-AVX512 machine due to kmovd is > > generated in dynamic check. > > > > Committed as an obvious fix. > > Hmm, now all avx512 tests SIGILL when testing with

Re: [PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread Richard Biener
On Wed, Jul 3, 2024 at 9:25 AM liuhongt wrote: > > The patch can avoid SIGILL on non-AVX512 machine due to kmovd is > generated in dynamic check. > > Committed as an obvious fix. Hmm, now all avx512 tests SIGILL when testing with -m32: Dump of assembler code for function __get_cpuid_count: => 0x

[PATCH][committed] Move runtime check into a separate function and guard it with target ("no-avx")

2024-07-03 Thread liuhongt
The patch can avoid SIGILL on non-AVX512 machine due to kmovd is generated in dynamic check. Committed as an obvious fix. gcc/testsuite/ChangeLog: PR target/115748 * gcc.target/i386/avx512-check.h: Move runtime check into a separate function and guard it with target ("no-

[PATCH Committed][APX ZU] Fix test for target-support check

2024-06-17 Thread Kong, Lingling
Fix test for APX ZU. Add attribute for no-inline and target APX, and target-support check. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Committed as an obvious patch. gcc/testsuite/ChangeLog: * gcc.target/i386/apx-zu-1.c: Add attribute for noinline,

libbacktrace patch committed: OK if zero backward bits

2024-06-16 Thread Ian Lance Taylor
I've committed this libbacktrace patch to not fail on the case where there are no bits available when looking backward. This can happen at the very end of the frame if no bits are actually required. The test case is long and may be proprietary, so not including it. Bootstrapped and ran libbacktra

[PATCH Committed] Fix ICE due to REGNO of a SUBREG.

2024-06-12 Thread liuhongt
Use reg_or_subregno instead. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Committed as an obvious patch. gcc/ChangeLog: PR target/115452 * config/i386/i386-features.cc (scalar_chain::convert_op): Use reg_or_subregno instead of REGNO to avoid ICE. gcc/testsui

[PATCH committed] Add additional option --param max-completely-peeled-insns=200 for power64*-*-*

2024-06-06 Thread liuhongt
gcc/testsuite/ChangeLog: * gcc.dg/vect/pr112325.c:Add additional option --param max-completely-peeled-insns=200 for power64*-*-*. --- gcc/testsuite/gcc.dg/vect/pr112325.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/vect/pr112325.c b/gcc/testsuite/gcc.

[PATCH Committed] Refine testcase for power10.

2024-06-05 Thread liuhongt
For power10, there're extra 3 REG_EQUIV notes with (fix:SI. to avoid the failure. Check (fix:SI is from the pattern not NOTE. gcc/testsuite/ChangeLog: PR target/115365 * gcc.dg/pr100927.c: Don't scan fix:SI from the note. --- gcc/testsuite/gcc.dg/pr100927.c | 2 +- 1 file changed

[PATCH][committed] [avx512] Fix predicate mismatch between vfcmaddcph's define_insn and define_expand.

2024-05-27 Thread liuhongt
When I applied Roger's patch [1], there's ICE due to it. The patch fix the latent bug. [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651365.html Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Pushed to trunk. gcc/ChangeLog: * config/i386/sse.md (___mask): Ali

[PATCH, committed] Fortran: fix frontend memleak

2024-05-12 Thread Harald Anlauf
Dear all, the attached obvious patch fixes a frontend memleak that was introduced recently, and which shows up when checking for inquiry references. I came across it when working on pr115039. Committed after regtesting as r15-391-g13b6ac4ebd04f0. Thanks, Harald From 13b6ac4ebd04f0703d92828c9268

libgo patch committed: Use in runtime/runtime.h

2024-04-29 Thread Ian Lance Taylor
This libgo patch changes runtime/runtime.h to use the C99 header file rather than defining a bool type and true/false constants itself. C99 was a long time ago and in case this file is always compiled by the newly built GCC. This should fix GCC PR 114875. Bootstrapped on x86_64-pc-linux-gnu. Co

[PATCH][committed] aarch64: Fix whitespace in aarch64-ldp-fusion.cc:alias_walker

2024-04-05 Thread Alex Coplan
I spotted this whitespace error during the review of https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648846.html. Pushing as obvious after testing on aarch64-linux-gnu. Thanks, Alex gcc/ChangeLog: * config/aarch64/aarch64-ldp-fusion.cc (struct alias_walker): Fix double spac

Go patch committed: Use correct check for index value overflow

2024-03-27 Thread Ian Lance Taylor
This patch to the Go frontend uses the correct size and comparison when doing an index value overflow check. This has apparently been wrong since I introduced the code ten years ago. This fixes GCC PR 114500. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 1

Go patch committed: Update issue16016 test

2024-03-27 Thread Ian Lance Taylor
This patch to the Go testsuite updates issue16016.go. This backports https://go.dev/cl/574536 into the GCC testsuite. This fixes PR go/114453. Bootstrapped and ran test. Committed to mainline. Ian 5b6f599670994bef957bd15c683102468a7104f1 diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue1

Go patch committed: initialize local variable in lower_method_expression

2024-03-27 Thread Ian Lance Taylor
This patch to the Go frontend fixes an uninitialized variables in lower_method_expression. This fixes GCC PR 114463. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 7b2a24f3964509bd5b74c4579c7ea5684e82aee1 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofron

[PATCH, committed] Fortran: error recovery in frontend optimization [PR103715]

2024-03-18 Thread Harald Anlauf
Dear all, I've committed the attached simple & obvious patch for an ICE due to an invalid read in frontend optimization after regtesting and an OK by Jerry in the PR. Pushed: https://gcc.gnu.org/g:3be2b8f475f22c531d6cef1b041c0573b3ea5133 As this PR is marked as a regression, I plan to backport t

Summary: [PATCH][committed]AArch64: Do not allow SIMD clones with simdlen 1 [PR113552][GCC 13/12/11 backport]

2024-03-12 Thread Tamar Christina
Hi All, This is a backport of g:306713c953d509720dc394c43c0890548bb0ae07. The AArch64 vector PCS does not allow simd calls with simdlen 1, however due to a bug we currently do allow it for num == 0. This causes us to emit a symbol that doesn't exist and we fail to link. Bootstrapped Regtested o

Re: libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread H.J. Lu
On Fri, Mar 8, 2024 at 2:48 PM Fangrui Song wrote: > > On ELF64, it looks like BFD uses 8-byte alignment for compressed > `.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not > know how the Solaris linker sets the alignment. > > The specification's wording makes me confused wheth

Re: libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread Fangrui Song
On ELF64, it looks like BFD uses 8-byte alignment for compressed `.debug_*` sections while gold/lld/mold use 1-byte alignment. I do not know how the Solaris linker sets the alignment. The specification's wording makes me confused whether it really requires 8-byte alignment, even if a non-packed `E

libbacktrace patch committed: Don't assume compressed section aligned

2024-03-08 Thread Ian Lance Taylor
Reportedly when lld compresses debug sections, it fails to set the alignment of the compressed section such that the compressed header can be read directly. To me this seems like a bug in lld. However, libbacktrace needs to work around it. This patch, originally by the GitHub user ubyte, does th

libbacktrace patch committed: Link test programs with -no-install

2024-03-02 Thread Ian Lance Taylor
Some of the libbacktrace tests link a program and then modify the debug info in some way. When configured with --enable-shared the linking, using libtool, generates a shell script. That causes the tests to fail because they can't modify the debug info of a shell script. This patch, originally by

libbacktrace patch committed: Skip all LZMA block header padding bytes

2024-03-02 Thread Ian Lance Taylor
This patch to libbacktrace corrects the LZMA block header parsing to skip all the padding bytes, verifying that they are zero. This fixes https://github.com/ianlancetaylor/libbacktrace/issues/118. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. I was able to verify that the proble

Re: libbacktrace patch committed: Read symbol table of debuginfo file

2024-03-01 Thread Ian Lance Taylor
On Thu, Feb 29, 2024 at 7:47 PM Ian Lance Taylor wrote: > > This patch to libbacktrace reads symbol tables from debuginfo files. > These become another symbol table to search. This is needed if people > use --strip-all rather than --strip-debug when adding a debuglink > section. This fixes > htt

libbacktrace patch committed: Read symbol table of debuginfo file

2024-02-29 Thread Ian Lance Taylor
This patch to libbacktrace reads symbol tables from debuginfo files. These become another symbol table to search. This is needed if people use --strip-all rather than --strip-debug when adding a debuglink section. This fixes https://github.com/ianlancetaylor/libbacktrace/issues/113. Bootstrapped

[PATCH][committed]middle-end: fix pointer conversion error in testcase vect-early-break_110-pr113467.c

2024-02-08 Thread Tamar Christina
Hi All, I had missed a conversion from unsigned long to uint64_t. This fixes the failing test on -m32. Regtested on x86_64-pc-linux-gnu with -m32 and no issues. Committed as obvious. Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-early-break_110-pr113467.c: Change unsigned

libgo patch committed: Bump version number

2024-02-05 Thread Ian Lance Taylor
This libgo patch bumps the version number for the GCC 14 release. This is for GCC PR 113668. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 7b0597eba6b29387b56b8d6a4b38f3586e6b49a5 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index ec7e2ab1

Go frontend patch committed: print types in a more readable way

2024-02-05 Thread Ian Lance Taylor
This patch to the Go frontend adds Type::message_name to print types in ways that makes sense to users. As we move toward generics, the error messages need to be able to refer to types in a readable manner. Today we use this new feature in AST dumps. Bootstrapped and ran Go testsuite on x86_64-pc

libgo patch committed: Better error messages for unsupported target

2024-02-02 Thread Ian Lance Taylor
This libgo patch generates better error messages then the Go GOARCH and GOOS values can't be determined from the target. This indicates that the target is not supported. This is for GCC PR 113530. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian cfc6d9ae8143c

Go patch committed: Export the type "any" as a builtin

2024-02-02 Thread Ian Lance Taylor
This patch to the Go frontend exports the type "any" as a builtin. Otherwise we can't tell the difference between builtin type "any" and a locally defined type "any". This will require updates to the gccgo export data parsers in the main Go repo and the x/tools repo. These updates are https://go.

[PATCH, committed] Fortran: fix bounds-checking errors for CLASS array dummies [PR104908]

2024-01-27 Thread Harald Anlauf
Dear all, commit r11-1235 for pr95331 addressed array bounds issues with unlimited polymorphic array dummies, but caused regressions for CLASS array dummies that lead to either wrong code with bounds-checking, or an ICE. The solution is simple: add a check whether the dummy is unlimited polymorph

Go patch committed: Don't pass iota value to lowering pass

2024-01-22 Thread Ian Lance Taylor
This patch to the Go frontend stops passing the iota value to the lowering pass. It is no longer used. The iota value is now handled in the determine-types pass. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 896148947b9ff4845c8bc334f8eff30f91ff3c9a diff -

[PATCH, committed] Fortran: fix wrong array bounds check [PR113471]

2024-01-19 Thread Harald Anlauf
Dear all, I've pushed the attached obvious patch for a regression due to a wrong array bounds check after regtesting on x86_64-pc-linux-gnu and verification of the fix by the reporter in the PR. https://gcc.gnu.org/g:94b2e6cb1cc4feb122bf77f19a657c97bffa9b42 Thanks, Harald From 94b2e6cb1cc4feb12

Re: Go patch committed: Move lowering pass after check types pass

2024-01-18 Thread Ian Lance Taylor
On Mon, Dec 18, 2023 at 5:32 PM Ian Lance Taylor wrote: > > This Go frontend patch moves the lowering pass after the type > determination and the type checking passes. This lets us simplify > some of the code that determines the type of an expression, which > previously had to work correctly both

[PATCH][committed][c++ frontend]: initialize ivdep value

2024-01-10 Thread Tamar Christina
Hi All, Should control enter the switch from one of the cases other than the IVDEP one then the variable remains uninitialized. This fixes it by initializing it to false. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues Committed as obvious. Thanks, Tamar gc

[PATCH][committed]middle-end: removed unused variable in vectorizable_live_operation_1

2024-01-09 Thread Tamar Christina
Hi All, It looks like the previous patch had an unused variable. It's odd that my bootstrap didn't catch it (I'm assuming -Werror is still on for O3 bootstraps) but this fixes it. Committed to fix bootstrap. Thanks, Tamar gcc/ChangeLog: * tree-vect-loop.cc (vectorizable_live_operation_

[PATCH, committed] Fortran: fix FE memleak

2024-01-03 Thread Harald Anlauf
Dear all, I've committed the attached, simple & obvious patch for a gmp memory leak in gfc_get_nodesc_array_type that shows up when running f951 under valgrind e.g. on testcase gfortran.dg/class_optional_2.f90, after regtesting on x86_64-pc-linux-gnu. (Note that this does not address the underlyi

[PATCH][committed]middle-end: explicitly initialize vec_stmts [PR113132]

2023-12-25 Thread Tamar Christina
Hi All, when configured with --enable-checking=release we get a false positive on the use of vec_stmts as the compiler seems unable to notice it gets initialized through the pass-by-reference. This explicitly initializes the local. Bootstrapped Regtested on x86_64-pc-linux-gnu and no issues. Co

Go patch committed: Move lowering pass after check types pass

2023-12-18 Thread Ian Lance Taylor
This Go frontend patch moves the lowering pass after the type determination and the type checking passes. This lets us simplify some of the code that determines the type of an expression, which previously had to work correctly both before and after type determination. I'm doing this to help with

[PATCH COMMITTED] gcc.c-torture/execute/931004-13.c: Fix declaration of main

2023-11-16 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/execute/931004-13.c (main): Fix mistakenly swapped int/void types. --- gcc/testsuite/gcc.c-torture/execute/931004-13.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-13.c b/gcc/tes

Go patch committed: Move Selector_expression up in file

2023-10-23 Thread Ian Lance Taylor
This patch to the Go frontend just moves Selector_expression up in file. This is a mechanical change to expressions.cc. This will make Selector_expression visible to Builtin_call_expression for later work. This produces a very large "git --diff", but "git diff --minimal" is clear. Bootstrapped a

Go patch committed: Make xx_constant_value methods non-const

2023-10-23 Thread Ian Lance Taylor
This patch to the Go frontend changes the Expression {numeric,string,boolean}_constant_value methods to be non-const. This does not affect anything immediately, but will be useful for later CLs in this series. The only real effect is to Builtin_call_expression::do_export, which remains const and

Go patch committed: Pass Gogo to Runtime::make_call

2023-10-23 Thread Ian Lance Taylor
This Go frontend patches passes the Gogo IR pointer to Runtime::make_call. This is a boilerplate change that doesn't affect compiler output. It's not currently used but will be used by later CLs in this series. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ia

Go patch committed: Add Expression::is_untyped method

2023-10-23 Thread Ian Lance Taylor
This Go frontend patches adds an Expression::is_untyped method. This method is not currently used by anything, but it will be used by later changes in this series. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian ac50e9b72bf9bb6d5b28096bb164fb050db6e290 diff

libgo patch committed: Add missing type conversion

2023-10-23 Thread Ian Lance Taylor
This libgo patch adds a missing type conversion. The gofrontend incorrectly accepted code that was missing a type conversion. The test case for this is bug518.go in https://go.dev/cl/536537. Future CLs in this series will detect the type error. Bootstrapped and ran Go testsuite on x86_64-pc-lin

Go patch committed: Remove the traverse_assignments code

2023-10-22 Thread Ian Lance Taylor
This patch to the Go frontend removes the traverse_assignments support. The last caller was removed in https://go.dev/cl/18261 in 2016. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian a6e74b0b3316f3f0b2096d6a175c31bed58ae4ed diff --git a/gcc/go/gofrontend/MER

Go patch committed: Remove name_ field from Type_switch_statement

2023-10-22 Thread Ian Lance Taylor
This patch to the Go frontend removes the name_ field from the Type_switch_statement class. It's not used for anything. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 1a1fba1e25779247a4969789885ce80b7b4a2359 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofr

Go patch committed: pass Gogo to more passes

2023-10-22 Thread Ian Lance Taylor
This patch to the G frontend passes a pointer to the Gogo IR to the determine types pass and the type verification pass. This is a straight refactoring that does not change the compiler behavior. This is in preparation for future CLs that rearrange the pass ordering. This introduces one new call

[PATCH/committed] sim: add distclean dep for gnulib

2023-10-15 Thread Mike Frysinger
ChangeLog: * Makefile.def: Add distclean-sim dependency on distclean-gnulib. * Makefile.in: Regenerate. --- Makefile.def | 1 + Makefile.in | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.def b/Makefile.def index 870150183b9a..15c068e4ac40 100644 --- a/Makefile.def

godump.cc patch committed: Handle _BitInt

2023-09-06 Thread Ian Lance Taylor via Gcc-patches
This patch to godump.cc adds support for BITINT_TYPE. Bootstrapped and ran godump and Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian gcc/ PR go/111310 * godump.cc (go_format_type): Handle BITINT_TYPE. gcc/testsuite/ PR go/111310 * gcc

libgo patch committed: permit $AR to include options

2023-09-06 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the go tool to permit the AR environment variable to include options. This mirrors the way it already handles the CC environment variable. This ports https://go.dev/cl/526275 to the gofrontend repo. This is needed for gccgo testing because the top-level GCC Makefile now

Re: [PATCH][committed] RISC-V: Add multiarch support on riscv-linux-gnu

2023-08-22 Thread Jeff Law
On 8/22/23 12:03, Palmer Dabbelt wrote: On Tue, 22 Aug 2023 10:39:38 PDT (-0700), Jeff Law wrote: The docs seem to suggest that we should have a multarch-compatible MULTILIB_OSDIRNAMES as we support both multilib and multiarch:    @code{MULTIARCH_DIRNAME} is not used for configurations

Re: [PATCH][committed] RISC-V: Add multiarch support on riscv-linux-gnu

2023-08-22 Thread Palmer Dabbelt
On Tue, 22 Aug 2023 10:39:38 PDT (-0700), Jeff Law wrote: This adds multiarch support to the RISC-V port so that bootstraps work with Debian out-of-the-box. Without this patch the stage1 compiler is unable to find headers/libraries when building the stage1 runtime. This is functionally (and po

[PATCH][committed] RISC-V: Add multiarch support on riscv-linux-gnu

2023-08-22 Thread Jeff Law
This adds multiarch support to the RISC-V port so that bootstraps work with Debian out-of-the-box. Without this patch the stage1 compiler is unable to find headers/libraries when building the stage1 runtime. This is functionally (and possibly textually) equivalent to Debian's fix for the sa

[PATCH, committed] Testsuite, darwin: Fix analyzer testcases

2023-08-20 Thread FX Coudert via Gcc-patches
Committed as obvious, fixing three more darwin-specific failures in analyzer testsuite. This fixes: FAIL: gcc.dg/plugin/taint-CVE-2011-0521-5.c -fplugin=./analyzer_kernel_plugin.so (test for warnings, line 39) FAIL: gcc.dg/plugin/taint-CVE-2011-0521-6.c -fplugin=./analyzer_kernel_plugi

[PATCH,committed] Fortran: fix memleak for character,value dummy of bind(c) procedure [PR110360]

2023-08-16 Thread Harald Anlauf via Gcc-patches
Dear all, the attached simple patch fixes a memleak in the frontend when a character literal is passed to a character,value dummy of a bind(c) procedure, by relying on gfc_replace_expr to do the cleanup. (This can be tested e.g. with gfortran.dg/bind_c_usage_13.f03 and running f951 under valgrind)

[PATCH][COMMITTED] doc: Fix spelling in arm_v8_1m_main_cde_mve_fp

2023-08-01 Thread Christophe Lyon via Gcc-patches
Fix spelling mistakes introduced by my previous patch in this area. Committed as obvious. 2023-08-01 Christophe Lyon gcc/ * doc/sourcebuild.texi (arm_v8_1m_main_cde_mve_fp): Fix spelling. --- gcc/doc/sourcebuild.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

libbacktrace patch committed

2023-07-31 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch, based on one by Andres Freund, uses the _pgmptr variable declared on Windows to find the executable file name if none is specified. Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Patch from Andres Freund: * configure.ac: C

Go patch committed: Support -fgo-importcfg

2023-06-26 Thread Ian Lance Taylor via Gcc-patches
The gc Go compiler has a -importcfg option that takes a file that provides a mapping from import paths to the files that satisfy those imports. This is used by the go build tool to let the compiler read imported packages directly out of the build cache. Without this option the go build tool has t

[PATCH][committed] aarch64: Use instead of in scalar SQRSHRUN pattern

2023-06-26 Thread Kyrylo Tkachov via Gcc-patches
Hi all, In the scalar pattern for SQRSHRUN it's a bit clearer to use DWI instead of V2XWIDE to make it more clear that no vector modes are involved. No behavioural change intended. Bootstrapped and tested on aarch64-none-linux-gnu. Pushing to trunk. Thanks, Kyrill gcc/ChangeLog: * conf

[PATCH][committed] aarch64: Clean up some rounding immediate predicates

2023-06-26 Thread Kyrylo Tkachov via Gcc-patches
Hi all, aarch64_simd_rsra_rnd_imm_vec is now used for more than just RSRA and accepts more than just vectors so rename it to make it more truthful. The aarch64_simd_rshrn_imm_vec is now unused and can be deleted. No behavioural change intended. Bootstrapped and tested on aarch64-none-linux-gnu. P

Go patch committed: Support bootstrapping Go 1.21

2023-06-23 Thread Ian Lance Taylor via Gcc-patches
compiler, libgo: support bootstrapping gc compiler In the Go 1.21 release the package internal/profile imports internal/lazyregexp. That works when bootstrapping with Go 1.17, because that compiler has internal/lazyregep and permits importing it. We also have internal/lazyregexp in libgo, but sin

Go patch committed: Determine types of Slice_{value, info} expressions

2023-06-21 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend determines the types of a couple of expressions types that accidentally failed to recurse into their subexpressions. The test case for this is https://go.dev/cl/505015. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian f42544e04a13

[PATCH][committed] aarch64: Avoid same input and output Z register for gather loads

2023-06-21 Thread Kyrylo Tkachov via Gcc-patches
Hi all, The architecture recommends that load-gather instructions avoid using the same Z register for the load address and the destination, and the Software Optimization Guides for Arm cores recommend that as well. This means that for code like: #include svuint64_t food (svbool_t p, uint64_t *i

[PATCH][committed] aarch64: Convert SVE gather patterns to compact syntax

2023-06-21 Thread Kyrylo Tkachov via Gcc-patches
Hi all, This patch converts the SVE load gather patterns to the new compact syntax that Tamar introduced. This allows for a future patch I want to contribute to add more alternatives that are better viewed in the more compact form. The lines in some patterns are >80 long now, but I think that's u

[PATCH][committed][docs]: replace backslashchar [PR 110329].

2023-06-21 Thread Tamar Christina via Gcc-patches
Hi All, It seems like @blackslashchar{} is a relatively new addition to texinfo. Other parts of the docs use @samp{\} so use it here too so older distros work. Bootstrapped on aarch64-none-linux-gnu and no issues. committed under obvious rule. Thanks, Tamar gcc/ChangeLog: PR other/11

Re: [gofrontend-dev] Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Cherry Mui via Gcc-patches
On Tue, Jun 20, 2023 at 3:37 PM Ian Lance Taylor wrote: > On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab > wrote: > > > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > > > This libgo patches changes the runtime pacakge to use a C function to > call mmap. > > > > > > The final ar

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor wrote: > OK, but I think that it does have something to do with big-endian. > The bug was that on some 32-bit systems it was passing a 64-bit value > to a function that expected a 32-bit value. The problem didn't show > up on 32-bit x86 because it is little-endian

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab wrote: > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > This libgo patches changes the runtime pacakge to use a C function to call > > mmap. > > > > The final argument to mmap, of type off_t, varies. In > > https://go.dev/cl/445375

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Andreas Schwab
On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > This libgo patches changes the runtime pacakge to use a C function to call > mmap. > > The final argument to mmap, of type off_t, varies. In > https://go.dev/cl/445375 > (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html)

libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patches changes the runtime pacakge to use a C function to call mmap. The final argument to mmap, of type off_t, varies. In https://go.dev/cl/445375 (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html) we changed it to always use the C off_t type, but that broke 32-bit b

[PATCH][committed] aarch64: Optimise ADDP with same source operands

2023-06-20 Thread Kyrylo Tkachov via Gcc-patches
Hi all, We've been asked to optimise the testcase in this patch of a 64-bit ADDP with the low and high halves of the same 128-bit vector. This can be done by a single .4s ADDP followed by just reading the bottom 64 bits. A splitter for this is quite straightforward now that all the vec_concat stuf

[PATCH][committed]AArch64 remove test comment from *mov_aarch64

2023-06-20 Thread Tamar Christina via Gcc-patches
Hi All, I accidentally left a test comment in the final version of the patch. This removes the comment. Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/ChangeLog: * config/aarch64/aarch64.md (*mov_aarch64): Drop test comment. ---

libgo patch committed: Add benchmarks and examples to test list

2023-06-16 Thread Ian Lance Taylor via Gcc-patches
In https://go.dev/cl/384695 (https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590289.html) I simplified the code that built lists of benchmarks, examples, and fuzz tests, and managed to break it. This patch corrects the code to once again make the benchmarks available, and to run the example

[PATCH][committed] arm: Extend -mtp= arguments

2023-06-13 Thread Kyrylo Tkachov via Gcc-patches
Hi all, After discussing the -mtp= option with Arm's LLVM developers we'd like to extend the functionality of the option somewhat. There are actually 3 system registers that can be accessed for the thread pointer in aarch32: tpidrurw, tpidruro, tpidrprw. They are all read through the CP15 co-pr

[PATCH][committed] aarch64: Extend -mtp= arguments

2023-06-13 Thread Kyrylo Tkachov via Gcc-patches
Hi all, After discussing the -mtp= option with Arm's LLVM developers we'd like to extend the functionality of the option somewhat. First of all, there is another TPIDR register that can be used to read the thread pointer: TPIDRRO_EL0 (which can also be accessed by AArch32 under another name) so i

[PATCH, committed] testsuite: Check int128 effective target for pr109932-{1,2}.c [PR110230]

2023-06-13 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make newly added test cases pr109932-{1,2}.c check int128 effective target to avoid unsupported type error on 32-bit. I did hit this failure during testing and fixed it, but made a stupid mistake not updating the local formatted patch which was actually out of date. Pushed a

RE: [PATCH][committed] Regenerate config.in

2023-06-12 Thread Tamar Christina via Gcc-patches
> > Do you use the DEFAULT_MATCHPD_PARTITIONS macro anywhere? > If not, why the AC_DEFINE_UNQUOTED at all and not just the AC_SUBST? > It used to be used to change the default of genmatch.cc, but the default is now not to split anymore. So guess I can remove it. Will follow up...

  1   2   3   4   5   6   7   8   9   10   >