Re: [PATCH v2 2/2] ada: add 128bit operation to MIPS N32 and N64

2021-02-17 Thread Arnaud Charlet
> For MIPS N64 and N32: > add GNATRTL_128BIT_PAIRS to LIBGNAT_TARGET_PAIRS > add GNATRTL_128BIT_OBJS to EXTRA_GNATRTL_NONTASKING_OBJS > > gcc/ada/ChangeLog: > PR ada/98996 > * Makefile.rtl (LIBGNAT_TARGET_PAIRS, EXTRA_GNATRTL_NONTASKING_OBJS) > : add 128Bit operation file to

[PATCH v6] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
On Wed, Feb 17, 2021 at 12:50 PM H.J. Lu wrote: > > On Wed, Feb 17, 2021 at 12:14 PM Jakub Jelinek wrote: > > > > On Wed, Feb 17, 2021 at 12:04:34PM -0800, H.J. Lu wrote:> > > > > + /* For -fretain-used-symbol, a "used" attribute also implies "retain". > > > */ > > > > s/-symbol/-symbols/ > >

[PATCH v2 2/2] ada: add 128bit operation to MIPS N32 and N64

2021-02-17 Thread YunQiang Su
For MIPS N64 and N32: add GNATRTL_128BIT_PAIRS to LIBGNAT_TARGET_PAIRS add GNATRTL_128BIT_OBJS to EXTRA_GNATRTL_NONTASKING_OBJS gcc/ada/ChangeLog: PR ada/98996 * Makefile.rtl (LIBGNAT_TARGET_PAIRS, EXTRA_GNATRTL_NONTASKING_OBJS) : add 128Bit operation file to MIPS N64 a

[PATCH v2 1/2] MIPS: unaligned load: use SImode for SUBREG if OK (PR98996)

2021-02-17 Thread YunQiang Su
It is found by ada s-pack96.adb ftbfs, due to 96bit load: 96 = 64 + 32. While the 32bit pair of l r is mark as SUBREG, so they are not in SImode, make it fail to find suitable insn. gcc/ChangeLog: * config/mips/mips.c (mips_expand_ext_as_unaligned_load): If TARGET_64BIT and dest is

Re: [PATCH 1/2] MIPS: unaligned load: use SImode for SUBREG if OK (PR98996)

2021-02-17 Thread YunQiang Su
Jeff Law 于2021年2月17日周三 上午3:16写道: > > > > On 2/14/21 6:33 PM, YunQiang Su wrote: > > It is found by ada s-pack96.adb ftbfs, due to 96bit load: 96 = 64 + 32. > > While the 32bit pair of l r is mark as SUBREG, so they are > > not in SImode, make it fail to find suitable insn. > > > > gcc/ChangeLog: >

PING [PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2021-02-17 Thread Kewen.Lin via Gcc-patches
Hi, I'd like to gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-February/564758.html BR, Kewen on 2021/2/3 下午2:37, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch merges the previously approved one[1] and its relied patch > made by Segher here[2], it's to make unsigned i

Ping: [PATCH] rs6000: Convert the vector element register to SImode [PR98914]

2021-02-17 Thread Xionghu Luo via Gcc-patches
Gentle ping, thanks. On 2021/2/3 17:01, Xionghu Luo wrote: v[k] will also be expanded to IFN VEC_SET if k is long type when built with -Og. -O0 didn't exposed the issue due to v is TREE_ADDRESSABLE, -O1 and above also didn't capture it because of v[k] is not optimized to VIEW_CONVERT_EXPR(v)[k

Re: Patch for PR analyzer/98797

2021-02-17 Thread David Malcolm via Gcc-patches
On Wed, 2021-02-17 at 23:18 +, brian.sobulefsky wrote: > Hi David, > > I'm sorry but I wanted to get this out to you. To clarify, I had a > statement of the form: > > end_offset <= covering_field->field_decl.bit_offset->int_cst.val[0] >     covering_field->decl_common.size->int_cst.val[0] - 1

Re: [PATCH] PR 99133, Mark xxspltiw, xxspltidp, and xxsplti32x as being prefixed

2021-02-17 Thread Segher Boessenkool
Hi! On Wed, Feb 17, 2021 at 12:17:30PM -0500, Michael Meissner wrote: > I noticed that the power10 xxspltiw, xxspltidp, and xxsplti32dx > instructions are not flagged as prefixed instructions, which means the > instruction length is not set to 12 bytes. This patch sets these > instructions to be

[PATCH] match.pd: Restrict clz cmp 0 replacement by single_use, PR99142

2021-02-17 Thread Hans-Peter Nilsson via Gcc-patches
If we're not going to eliminate the clz, it's better for the comparison to use that result than its input, so we don't extend the lifetime of the input. Also, an additional use of the result is more likely cheaper than a compare of the input, in particular considering that the clz may have made av

Re: Patch for PR analyzer/98797

2021-02-17 Thread brian.sobulefsky via Gcc-patches
Hi David, I'm sorry but I wanted to get this out to you. To clarify, I had a statement of the form: end_offset <= covering_field->field_decl.bit_offset->int_cst.val[0] covering_field->decl_common.size->int_cst.val[0] - 1; (Sorry if my email is clobbering the angle brackets). I have replaced

[committed] testsuite: add regression test for PR analyzer/94596

2021-02-17 Thread David Malcolm via Gcc-patches
This use-after-free false positive affected GCC 10, but seems to be fixed in trunk for GCC 11; adding a reduced version as a regression test. Successfully regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r11-7272-g963aecff2473080d748b2fc1ea2e32cef36cab11. gcc/testsuite/ChangeLog: PR

[r11-7271 Regression] FAIL: g++.dg/modules/pr99023_a.H (test for excess errors) on Linux/x86_64

2021-02-17 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, d8889c99aab4b599aa7ceb7079e69a9766171336 is the first bad commit commit d8889c99aab4b599aa7ceb7079e69a9766171336 Author: Nathan Sidwell Date: Wed Feb 17 10:43:21 2021 -0800 c++: Macros need to be GTY-reachable [PR 99023] caused FAIL: g++.dg/modules/pr99023_a.H module-cmi

Re: [Patch] Fortran: Fix rank of assumed-rank array [PR99043]

2021-02-17 Thread Thomas Koenig via Gcc-patches
Hi Tobias, OK for mainline? Reported against GCC 10, not a regression but simple wrong-code fix; does it make sense to apply there was well? OK for both. Thanks for the patch! Best regards Thomas

Re: [Patch] Fortran: Fix ubound simplifcation [PR99027]

2021-02-17 Thread Thomas Koenig via Gcc-patches
Hi Tobias, The problem which accessing dim= for an expression is that when the argument is an array, dim= and expr->rank are relative to the resulting array – but the array-ref also contains the DIMEN_ELEMENT which does not count for dim=/rank. OK for the trunk? (Reported against GCC 11, but I

Re: [PATCH] array-bounds: Fix up ICE on overaligned variables [PR99109]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 02:38:04PM -0700, Martin Sebor wrote: > How does build_printable_array_type sound? I'll go with that. > Also, would using TYPE_MAIN_VARIANT whenever TYPE_USER_ALIGN is set > be a simpler solution? (It might not be as refined as the test in > your patch but I don't think w

Re: [PATCH] array-bounds: Fix up ICE on overaligned variables [PR99109]

2021-02-17 Thread Martin Sebor via Gcc-patches
On 2/17/21 1:56 PM, Jakub Jelinek wrote: On Wed, Feb 17, 2021 at 01:38:56PM -0700, Martin Sebor wrote: - reftype = build_array_type_nelts (reftype, 1); + { + if (overaligned_type_p (reftype)) + reftype = TYPE_MAIN_VARIANT (reftype); + reftype = build_array_t

Re: [PATCH] handle VLA of zero length arrays and vice versa (PR 99121)

2021-02-17 Thread Martin Sebor via Gcc-patches
On 2/17/21 1:47 PM, Jakub Jelinek wrote: On Wed, Feb 17, 2021 at 01:27:55PM -0700, Martin Sebor wrote: Not in this patch, but I've looked at what maxobjsize is and wonder why the roundtrip tree -> HOST_WIDE_INT -> offset_int: const offset_int maxobjsize = tree_to_shwi (max_object_size ()); Ca

Re: [[PATCH] 1/3] aarch64: Sanitize access to cfun in aarch64_declare_function_name()

2021-02-17 Thread Andrew Pinski via Gcc-patches
On Wed, Dec 9, 2020 at 9:21 AM Christoph Müllner wrote: > > From: Christoph Muellner > > It is possible to call aarch64_declare_function_name() and > have cfun not set. Let's sanitize the access to this variable. > > gcc/ > > * config/aarch64/aarch64.c (aarch64_declare_function_name): > S

Re: [PATCH] array-bounds: Fix up ICE on overaligned variables [PR99109]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 01:38:56PM -0700, Martin Sebor wrote: > > - reftype = build_array_type_nelts (reftype, 1); > > + { > > + if (overaligned_type_p (reftype)) > > + reftype = TYPE_MAIN_VARIANT (reftype); > > + reftype = build_array_type_nelts (reftype, 1); > > + } > > Rathe

[PATCH v5] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
On Wed, Feb 17, 2021 at 12:14 PM Jakub Jelinek wrote: > > On Wed, Feb 17, 2021 at 12:04:34PM -0800, H.J. Lu wrote:> > > > + /* For -fretain-used-symbol, a "used" attribute also implies "retain". > > */ > > s/-symbol/-symbols/ Fixed. > > + if (flag_retain_used_symbols > > + && attributes

Re: [PATCH] handle VLA of zero length arrays and vice versa (PR 99121)

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 01:27:55PM -0700, Martin Sebor wrote: Not in this patch, but I've looked at what maxobjsize is and wonder why the roundtrip tree -> HOST_WIDE_INT -> offset_int: const offset_int maxobjsize = tree_to_shwi (max_object_size ()); Can't it be const offset_int maxobjsize = wi

Re: [PATCH] array-bounds: Fix up ICE on overaligned variables [PR99109]

2021-02-17 Thread Martin Sebor via Gcc-patches
On 2/17/21 3:12 AM, Jakub Jelinek via Gcc-patches wrote: Hi! check_mem_ref builds artificial arrays for variables that don't have array type. The C standard says: "For the purposes of these operators, a pointer to an object that is not an element of an array behaves the same as a pointer to the

Re: [PATCH] handle VLA of zero length arrays and vice versa (PR 99121)

2021-02-17 Thread Martin Sebor via Gcc-patches
On 2/17/21 6:56 AM, Jakub Jelinek wrote: On Tue, Feb 16, 2021 at 08:34:41PM -0700, Martin Sebor via Gcc-patches wrote: + if (integer_all_onesp (nelts)) + /* Zero length array. */ + eltsize = 0; + else { - tree bnds[] = { TYPE_MIN_VALUE

Re: [PATCH v4] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 12:04:34PM -0800, H.J. Lu wrote:> > > + /* For -fretain-used-symbol, a "used" attribute also implies "retain". */ s/-symbol/-symbols/ > + if (flag_retain_used_symbols > + && attributes > + && (TREE_CODE (*node) == FUNCTION_DECL > + || (VAR_P (*node) && T

[PATCH v4] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
On Wed, Feb 17, 2021 at 10:57 AM Jakub Jelinek wrote: > > On Wed, Feb 17, 2021 at 09:34:34AM -0800, H.J. Lu wrote: > > -fretain-used-symols. > > +/* Add the NAME attribute to *ANODE. */ > > + > > +static void > > +add_attribute (tree *anode, int flags, tree name, tree args, tree ns, > > +

Re: [PATCH v3] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 09:34:34AM -0800, H.J. Lu wrote: > -fretain-used-symols. > +/* Add the NAME attribute to *ANODE. */ > + > +static void > +add_attribute (tree *anode, int flags, tree name, tree args, tree ns, > +const bool cxx11_attr_p, > +const struct attribute_spec

[PATCH v3] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
On Wed, Feb 17, 2021 at 6:26 AM Jakub Jelinek wrote: > > On Tue, Feb 16, 2021 at 11:59:21AM -0800, H.J. Lu wrote: > > PR target/99113 > > * common.opt: Add -fgnu-retain. > > I'm not sure -fgnu-retain as the option name. > Wouldn't say -fretain-used-vars be better? I used -fretain-used

[PATCH] PR 99133, Mark xxspltiw, xxspltidp, and xxsplti32x as being prefixed

2021-02-17 Thread Michael Meissner via Gcc-patches
PR 99133, Mark xxspltiw, xxspltidp, and xxsplti32x as being prefixed I noticed that the power10 xxspltiw, xxspltidp, and xxsplti32dx instructions are not flagged as prefixed instructions, which means the instruction length is not set to 12 bytes. This patch sets these instructions to be prefixed.

[committed] analyzer: fix false leak involving params [PR98969]

2021-02-17 Thread David Malcolm via Gcc-patches
This patch updates the svalue liveness code so that the initial value of parameters at top-level functions to the analysis are treated as live (since the values are presumably still live within the outside-of-the-analysis calling code). This fixes the false leak in PR analyzer/98969 seen on: void

Re: [PATCH v2] Add -fgnu-retain to place used symbols in SHF_GNU_RETAIN section

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 16, 2021 at 11:59:21AM -0800, H.J. Lu wrote: > PR target/99113 > * common.opt: Add -fgnu-retain. I'm not sure -fgnu-retain as the option name. Wouldn't say -fretain-used-vars be better? > @@ -1666,6 +1666,10 @@ floop-unroll-and-jam > Common Var(flag_unroll_jam) Optimizati

Re: [PATCH 2/2] openacc: Strided array sections and components of derived-type arrays

2021-02-17 Thread Julian Brown
On Tue, 16 Feb 2021 11:09:17 +0100 Tobias Burnus wrote: > On 12.02.21 16:46, Julian Brown wrote: > > This patch disallows selecting components of array sections in > > update directives for OpenACC, as specified in OpenACC 3.0, > > "2.14.4. Update Directive", "Restrictions": > > > >"In Fortra

[AArch64] PR98657: Fix vec_duplicate creation in SVE's 3

2021-02-17 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch prevents generating a vec_duplicate with illegal predicate. Regression tested on aarch64-linux-gnu. OK for trunk? gcc/ChangeLog: 2021-02-17  Andre Vieira      PR target/98657     * config/aarch64/aarch64-sve.md: Use 'expand_vector_broadcast' to emit vec_duplicate's  

Re: [PATCH] handle VLA of zero length arrays and vice versa (PR 99121)

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 16, 2021 at 08:34:41PM -0700, Martin Sebor via Gcc-patches wrote: > + if (integer_all_onesp (nelts)) > + /* Zero length array. */ > + eltsize = 0; > + else > { > - tree bnds[] = { TYPE_MIN_VALUE (dom), TYPE_MAX_VALUE (dom) }; > -

Re: [PATCH] c++: Fix up build_zero_init_1 once more [PR99106]

2021-02-17 Thread Nathan Sidwell
On 2/17/21 4:50 AM, Jakub Jelinek wrote: Hi! My earlier build_zero_init_1 patch for flexible array members created an empty CONSTRUCTOR. As the following testcase shows, that doesn't work very well because the middle-end doesn't expect CONSTRUCTOR elements with incomplete type (that the empty C

c++: More set_identifier_type_value fixing [PR 99116]

2021-02-17 Thread Nathan Sidwell
My recent change looked under template_parms in two places, but that was covering up a separate problem. We were attempting to set the identifier_type_value of a template_parm into the template_parm scope. The peeking stopped us doing that, but confused poplevel, leaving an identifier value l

c++: ICE with header-units [PR 99071]

2021-02-17 Thread Nathan Sidwell
This ICE was caused by dereferencing the wrong pointer and not finding the expected thing there. Pointers are like that. PR c++/99071 gcc/cp/ * name-lookup.c (maybe_record_mergeable_decl): Deref the correct pointer. gcc/testsuite/ * g++.dg/modules

Re: [PATCH] profiling: fix streaming of TOPN counters

2021-02-17 Thread Martin Liška
On 2/17/21 9:36 AM, Martin Liška wrote: I'll write it even more robust... This is more elegant approach I've just tested on the instrumented clang. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From a8a879ba8a8ce3e90a712ff4c436b5

Re: [PATCH] split, i386, v5: Fix up df uses in i386 splitters [PR99104]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 10:30:06AM +, Richard Sandiford wrote: > Hmm. I think that just means that the optimisation performed by > the copy constructor isn't valid in practice (even if it should be > in principle). Guess this is the curse of manipulating data structures > directly rather than

Re: [PATCH] MIPS: Fix PR target/98491 (ChangeLog)

2021-02-17 Thread Richard Sandiford via Gcc-patches
Xi Ruoyao via Gcc-patches writes: >> > > > I can't understand the comment either.  To me it looks like it's >> > > > possible to >> > > > remove this "if (MSA_SUPPORTED_P (mode)) return 0;" I think the point is that the MSA loads and stores only have a 10-bit offset field instead of the usual 16-

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-17 Thread Jozef Lawrynowicz
On Tue, Feb 16, 2021 at 05:45:47PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Mon, Feb 15, 2021 at 02:35:07PM -0800, H.J. Lu via Gcc-patches wrote: > > When building Linux kernel, ld in bninutils 2.36 with GCC 11 generates > > thousands of > > > > ld: warning: orphan section `.data.event_ini

Re: [PATCH] MIPS: Fix PR target/98491 (ChangeLog)

2021-02-17 Thread Xi Ruoyao via Gcc-patches
On 2021-02-16 11:59 +0800, Xi Ruoyao wrote: > On 2021-02-15 16:16 -0700, Jeff Law wrote: > > > > > > On 2/12/21 7:17 AM, Xi Ruoyao wrote: > > > On 2021-01-11 01:01 +0800, Xi Ruoyao wrote: > > > > Hi Jeff and Jakub, > > > > > > > > On 2021-01-04 14:19 -0700, Jeff Law wrote: > > > > > On 1/4/21 2:

Re: [PATCH] split, i386, v5: Fix up df uses in i386 splitters [PR99104]

2021-02-17 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Tue, Feb 16, 2021 at 03:03:56PM +, Richard Sandiford via Gcc-patches > wrote: >> > On Tue, Feb 16, 2021 at 01:09:43PM +, Richard Sandiford wrote: >> >> Can I put in a plea to put this in recog.[hc], and possibly also make >> >> it a copy constructor for recog_da

[PATCH] array-bounds: Fix up ICE on overaligned variables [PR99109]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
Hi! check_mem_ref builds artificial arrays for variables that don't have array type. The C standard says: "For the purposes of these operators, a pointer to an object that is not an element of an array behaves the same as a pointer to the first element of an array of length one with the type of

[PATCH] i386: Avoid C++ global constructors in every object that includes i386.h

2021-02-17 Thread Jakub Jelinek via Gcc-patches
Hi! When looking at recog.o when working on the recog.[ch] changes to make sure I have not introduced runtime construction of recog_data variable, I have noticed that at least in unoptimized build, every single *.o file that included i386.h has lots of runtime constructors for all the PTA_* variab

New Russian PO file for 'cpplib' (version 11.1-b20210207)

2021-02-17 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'cpplib' has been submitted by the Russian team of translators. The file is available at: https://translationproject.org/latest/cpplib/ru.po (This file, 'cpplib-11.1-b202102

Contents of PO file 'cpplib-11.1-b20210207.ru.po'

2021-02-17 Thread Translation Project Robot
cpplib-11.1-b20210207.ru.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

[PATCH] c++: Fix up build_zero_init_1 once more [PR99106]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
Hi! My earlier build_zero_init_1 patch for flexible array members created an empty CONSTRUCTOR. As the following testcase shows, that doesn't work very well because the middle-end doesn't expect CONSTRUCTOR elements with incomplete type (that the empty CONSTRUCTOR at the end of outer CONSTRUCTOR

[PATCH] split, i386, v5: Fix up df uses in i386 splitters [PR99104]

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 16, 2021 at 03:03:56PM +, Richard Sandiford via Gcc-patches wrote: > > On Tue, Feb 16, 2021 at 01:09:43PM +, Richard Sandiford wrote: > >> Can I put in a plea to put this in recog.[hc], and possibly also make > >> it a copy constructor for recog_data_d? I can't think of any le

Re: [patch, fortran] PR96686 Namelist group objects shall be defined before appearing in namelist

2021-02-17 Thread Tobias Burnus
Hi Jerry, I note that you have not written that testcase and I am still half aspleep, but I fail to see what's wrong with the following program (before and after your change): f2 looks like a local and implicitly typed real variable. At least ifort compiles this program successfully. F2018 has:

Re: [PATCH] profiling: fix streaming of TOPN counters

2021-02-17 Thread Martin Liška
On 2/16/21 9:46 PM, Richard Biener wrote: Looks like this can only shrink the race window. Yes, kind of. Don't you need atomic accesses or locking here? Can the number of counters change? So what we do: we want to stream out N TOPN counters where each looks like this: {total_count, number