[C] Fix thinko in new warning on type punning for storage order purposes

2021-06-06 Thread Eric Botcazou
I obviously forgot that in C, unlike in Ada, the storage order of arrays is that of their component type, so you need to look at it when deciding to warn. The bug reporter also complains about a bogus warning on the assignment of a pointer returned by alloca or malloc, so this also fixes that. T

Re: [PATCH PR100740]Fix overflow check in simplifying exit cond comparing two IVs.

2021-06-06 Thread Bin.Cheng via Gcc-patches
On Wed, Jun 2, 2021 at 3:28 PM Richard Biener via Gcc-patches wrote: > > On Tue, Jun 1, 2021 at 4:00 PM bin.cheng via Gcc-patches > wrote: > > > > Hi, > > As described in patch summary, this fixes the wrong code issue by adding > > overflow-ness > > check for iv1.step - iv2.step. > > > > Bootstr

Re: [COMITTED, Patch, Fortran, backport 2 gcc-11] PR98301 Re: RANDOM_INIT() and coarray Fortran

2021-06-06 Thread Andre Vehreschild via Gcc-patches
Hi Steve, hi all, the patch for pr98301 has been backported to gcc-11 as 002745ca3668fc5e87c22acc81caaeaaadf9c47a Regards, Andre On Sat, 5 Jun 2021 09:27:16 -0700 Steve Kargl wrote: > On Sat, Jun 05, 2021 at 04:04:51PM +0200, Andre Vehreschild wrote: > > > > I was asked to backport the

[PATCH] libgomp: Compile tests with -march=i486 if needed

2021-06-06 Thread H.J. Lu via Gcc-patches
Don't add -march=i486 if atomic compare-and-swap is supported on 'int'. This fixes libgomp tests with "-march=x86-64 -m32 -fcf-protection". * testsuite/lib/libgomp.exp (libgomp_init): Don't add -march=i486 if atomic compare-and-swap is supported on 'int'. --- libgomp/testsuite/lib

[PATCH][OBVIOUS] docs: Add missing @headitem for tables.

2021-06-06 Thread Martin Liška
Quite some TEXI tables do miss table header. The patch adds that. Pushed to master as obvious. Martin gcc/ChangeLog: * doc/extend.texi: Add missing @headitem. * doc/invoke.texi: Likewise. * doc/objc.texi: Likewise. --- gcc/doc/extend.texi | 12 ++-- gcc/doc/inv

[PATCH][pushed] docs: remove extra character.

2021-06-06 Thread Martin Liška
Fix of a typo. Martin gcc/ChangeLog: * doc/invoke.texi: Remove extra character. --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index eb8142f596d..7102999cf31 100644 --- a/gcc/doc/invoke.texi +++ b/gc

[PATCH][pushed] genhooks: remove dead code

2021-06-06 Thread Martin Liška
Hello. We not longer use @Fcode in .def target hooks and I'm going to remove a dead code. Pushed to master. Martin gcc/ChangeLog: * genhooks.c (emit_findices): Remove unused function. (emit_documentation): Do not call emit_findices and do not search for @Fcode directive

[PATCH] Reformat target.def for better parsing.

2021-06-06 Thread Martin Liška
Hello. I'll need to parse output of tm.texi when converted to Sphinx for the future conversion. So that I split DEFHOOK documentation entries with newlines. I'll install the patch if there are no comments? Thanks, Martin gcc/c-family/ChangeLog: * c-target.def: Split long lines and repl

[PATCH] tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]

2021-06-06 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because gimple_call_arg_ptr (..., 0) asserts that there is at least one argument, while we were using it even if we didn't copy anything just to get a pointer from/to which the zero arguments should be copied. Fixed by guarding the memcpy calls. Also, the code wa

Re:[Patch, fortran] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-06 Thread dhumieres.dominique--- via Gcc-patches
Hi José, Patch tested only on x86_64-pc-linux-gnu. Also tested on darwin20. The patch is OK for me provided the updated PR94331.c test file replaces the original one. Since the PRs are about wrong code, I think the patch should be backported to at least GCC11 (applied and regtested OK). Th

[PATCH] i386: Clean up constraints.md

2021-06-06 Thread Uros Bizjak via Gcc-patches
No functional changes. 2021-06-06 Uroš Bizjak gcc/ * config/i386/constraints.md (Bs): Remove boolean operators from match_test RTX. (Bw): Ditto. (L): Ditto. (M): Use "mode" variable instead of GET_MODE (op) in match_test RTX. (Wz): Ditto. Bootstrapped and regression te

[PATCH,AIX] Use assemble_name to output BSS section name.

2021-06-06 Thread David Edelsohn via Gcc-patches
aix: Use assemble_name to output BSS section name. The code to emit BSS CSECT needs to support user assembler name. * config/rs6000/rs6000.c (rs6000_xcoff_asm_output_aligned_decl_common): Use assemble_name to output BSS section name. diff --git a/gcc/confi

[SPARC] Reimplement LEAF_REG_REMAP macro

2021-06-06 Thread Eric Botcazou
The current implementation as an array of chars is indeed a bit awkward so this reimplements it as a function taking and returning an int. Tested on SPARC/Solaris, applied on the mainline. 2021-06-06 Eric Botcazou * config/sparc/sparc-protos.h (order_regs_for_local_alloc): Rename

[PATCH] Add --enable-default-semantic-interposition to GCC configure

2021-06-06 Thread Fangrui Song via Gcc-patches
From: Fangrui Song --enable-default-semantic-interposition=no makes -fPIC default to -fno-semantic-interposition which enables interprocedural optimizations for default visibility non-vague-linkage function definitions. The suppression of interprocedural optimizations and inlining for such funct

Re: [PATCH] Add --enable-default-semantic-interposition to GCC configure

2021-06-06 Thread Andrew Pinski via Gcc-patches
On Sun, Jun 6, 2021 at 4:13 PM Fangrui Song via Gcc-patches wrote: > > From: Fangrui Song > > --enable-default-semantic-interposition=no makes -fPIC default to > -fno-semantic-interposition which enables interprocedural optimizations > for default visibility non-vague-linkage function definitions

Re: [PATCH] Add --enable-default-semantic-interposition to GCC configure

2021-06-06 Thread Fangrui Song
On 2021-06-06, Andrew Pinski wrote: On Sun, Jun 6, 2021 at 4:13 PM Fangrui Song via Gcc-patches wrote: From: Fangrui Song --enable-default-semantic-interposition=no makes -fPIC default to -fno-semantic-interposition which enables interprocedural optimizations for default visibility non-vague

Ping: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-06-06 Thread Xionghu Luo via Gcc-patches
Gentle ping, thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570333.html On 2021/5/14 14:57, Xionghu Luo via Gcc-patches wrote: Hi, On 2021/5/13 18:49, Segher Boessenkool wrote: Hi! On Fri, Apr 30, 2021 at 01:32:58AM -0500, Xionghu Luo wrote: The vsel instruction is a bit-wise s

[PATCH 0/3]: C N2653 char8_t implementation

2021-06-06 Thread Tom Honermann via Gcc-patches
This series of patches implements the core language features for the WG14 N2653 [1] proposal to provide char8_t support in C. These changes are intended to align char8_t support in C with the support provided in C++20 via WG21 P0482R6 [2]. These changes do not impact default gcc behavior. Th

[PATCH 1/3]: C N2653 char8_t: Language support

2021-06-06 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes proposed in WG14 N2653 [1] for C. The changes include: - Use of the existing -fchar8_t and -fno-char8_t options to opt-in to (or opt-out of) the following changes when compiling C code. - Change of type for UTF-8 st

[PATCH 2/3]: C N2653 char8_t: New tests​

2021-06-06 Thread Tom Honermann via Gcc-patches
This patch provides new tests for the core language and compiler dependent library changes proposed in WG14 N2653 [1] for C. Most of the tests are provided in both a positive (-fchar8_t) and negative (-fno-char8_t) form to ensure behaviors are appropriately present or absent in each mode. Te

[PATCH 3/3]: C N2653 char8_t: Documentation updates

2021-06-06 Thread Tom Honermann via Gcc-patches
This patch updates documentation for the -fchar8_t and -fno-char8_t options to describe their effect on C code as proposed in WG14 N2653 [1]. Tested on Linux x86_64. 2021-05-31 Tom Honermann * doc/invoke.texi (-fchar8_t): update for char8_t support for C. Tom. [1]: WG14 N2653

Re: Ping^2: [PATCH 1/2] correct BB frequencies after loop changed

2021-06-06 Thread guojiufu via Gcc-patches
Gentle ping ;) BR. Jiufu Guo On 2021-05-20 15:19, guojiufu via Gcc-patches wrote: Gentle ping^. On 2021-05-07 10:36, guojiufu via Gcc-patches wrote: Gentle ping. Original message: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555871.html Thanks, Jiufu Guo.

Re: [PATCH] Use _GLIBCXX_ASSERTIONS as _GLIBCXX_DEBUG light

2021-06-06 Thread François Dumont via Gcc-patches
On 03/06/21 2:31 pm, Jonathan Wakely wrote: On 27/05/21 19:37 +0200, François Dumont via Libstdc++ wrote: We have been talking for a long time of a debug mode with less impact on performances. We already have it, that's what _GLIBCXX_ASSERTIONS already is :-) I propose to simply use the exis

Ping^2: [PATCH] rs6000: Expand fmod and remainder when built with fast-math [PR97142]

2021-06-06 Thread Xionghu Luo via Gcc-patches
Ping, thanks. On 2021/5/14 15:13, Xionghu Luo via Gcc-patches wrote: Test SPEC2017 Ofast P8LE for this patch : 511.povray_r +1.14%, 526.blender_r +1.72%, no obvious changes to others. On 2021/5/6 10:36, Xionghu Luo via Gcc-patches wrote: Gentle ping, thanks. On 2021/4/16 15:10, Xiong Hu Lu

Ping: [PATCH] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-06-06 Thread Xionghu Luo via Gcc-patches
Ping, thanks. On 2021/5/24 17:02, Xionghu Luo wrote: From: Xiong Hu Luo vmrghb only accepts permute index {0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23} no matter for BE or LE in ISA, similarly for vmrghlb. Remove UNSPEC_VMRGH_DIRECT/UNSPEC_VMRGL_DIRECT pattern as vec_select + vec_c

Re: [PATCH] Reformat target.def for better parsing.

2021-06-06 Thread Richard Biener via Gcc-patches
On Sun, Jun 6, 2021 at 7:13 PM Martin Liška wrote: > > Hello. > > I'll need to parse output of tm.texi when converted to Sphinx for the future > conversion. So that I split DEFHOOK documentation entries with newlines. > > I'll install the patch if there are no comments? Hmm, what's the problem wi

Re: [PATCH] tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]

2021-06-06 Thread Richard Biener
On Sun, 6 Jun 2021, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs, because gimple_call_arg_ptr (..., 0) > asserts that there is at least one argument, while we were using > it even if we didn't copy anything just to get a pointer from/to which > the zero arguments should be copied. >

Re: [PATCH] Simplify (view_convert ~a) < 0 to (view_convert a) >= 0 [PR middle-end/100738]

2021-06-06 Thread Hongtao Liu via Gcc-patches
On Fri, Jun 4, 2021 at 4:18 PM Marc Glisse wrote: > > On Fri, 4 Jun 2021, Hongtao Liu via Gcc-patches wrote: > > > On Tue, Jun 1, 2021 at 6:17 PM Marc Glisse wrote: > >> > >> On Tue, 1 Jun 2021, Hongtao Liu via Gcc-patches wrote: > >> > >>> Hi: > >>> This patch is about to simplify (view_convert

Re: [PATCH] fold-const: Fix up fold_read_from_vector [PR100887]

2021-06-06 Thread Richard Biener
On Fri, 4 Jun 2021, Jakub Jelinek wrote: > On Fri, Jun 04, 2021 at 04:06:43PM +0200, Richard Biener wrote: > > On June 4, 2021 10:44:42 AM GMT+02:00, Jakub Jelinek > > wrote: > > >Hi! > > > > > >The callers of fold_read_from_vector expect that the index they pass is > > >an index of an element i