[PATCH] Support bitfields in Wodr machinery (PR lto/85405).

2018-04-16 Thread Martin Liška
Hi. This is Honza's ODR warning patch that I've just tested. He approved that. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Martin gcc/ChangeLog: 2018-04-16 Jan Hubicka PR lto/85405 * ipa-devirt.c (odr_types_equivalent_p): Handle bit

Re: [PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-16 Thread Jason Merrill
On Mon, Apr 16, 2018 at 9:45 PM, Alexandre Oliva wrote: > On Apr 16, 2018, Jason Merrill wrote: > >> This change looks good. One other nit: get_decl_maybe can also return a >> list, so the name seems wrong. > > Uhh, it's "give me the decl if you got one, but

Re: [PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-16 Thread Alexandre Oliva
On Apr 16, 2018, Jason Merrill wrote: > This change looks good. One other nit: get_decl_maybe can also return a > list, so the name seems wrong. Uhh, it's "give me the decl if you got one, but it's ok if you give me a list" (the latter is what makes it _maybe). It replaces

Re: [PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-16 Thread Jason Merrill
On Mon, Apr 16, 2018, 3:20 PM Alexandre Oliva wrote: > On Apr 16, 2018, Jason Merrill wrote: > > > On Fri, Apr 13, 2018, 5:19 PM Alexandre Oliva wrote: > >> + tree get_node () const { > >> +if (!split_list_p ()) return tldcl; > >> +

Re: [C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jason Merrill
On Mon, Apr 16, 2018, 1:31 PM Jakub Jelinek wrote: > On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > > On the following new testcase we emit 2 different constexpr errors > > because of premature folding, where the PR44100 hack which is supposed > > to fold

[C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jakub Jelinek
Hi! On the following new testcase we emit 2 different constexpr errors because of premature folding, where the PR44100 hack which is supposed to fold expressions like &((S *)0)->f or &((S *)24)->f folds all the >y expressions if x is TREE_CONSTANT into (some type)(x + cst) where what we were

Re: PING^4: [PATCH] Use dlsym to check if libdl is needed for plugin

2018-04-16 Thread Alexandre Oliva
On Apr 3, 2018, "H.J. Lu" wrote: > On Mon, Mar 26, 2018 at 4:10 AM, H.J. Lu wrote: >> On Wed, Mar 14, 2018 at 4:41 AM, H.J. Lu wrote: >>> On Wed, Feb 21, 2018 at 3:02 AM, H.J. Lu wrote: On Wed, Oct 18,

Re: [PATCH], Fix PR target/85424, PowerPC __builtin_packlongdouble bug discovered in PR target/85075

2018-04-16 Thread Segher Boessenkool
On Mon, Apr 16, 2018 at 03:14:25PM -0400, Michael Meissner wrote: > With the code changes in the patch for PR target/85075, I noticed that the > PowerPC big-endian build stopped in building big endian, 32-bit libgcc when > configured for power8. The issue was this latent bug. Segher asked me to

Re: [PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-16 Thread Segher Boessenkool
On Mon, Apr 16, 2018 at 09:26:13AM -0700, Carl Love wrote: > > But then the & ~0x1f test is not good either, it does not work for > > values > > -16..-1 ? > > > > You cannot handle signed and unsigned exactly the same for the test > > for > > allowed values. > The test > > if (TREE_CODE (arg0)

Re: [PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-16 Thread Alexandre Oliva
On Apr 16, 2018, Jason Merrill wrote: > On Fri, Apr 13, 2018, 5:19 PM Alexandre Oliva wrote: >> + tree get_node () const { >> +if (!split_list_p ()) return tldcl; >> +else return const_cast (this)->to_list (); >> + } > This looks like a dangerous

Re: Protect from comma operator overload

2018-04-16 Thread Jonathan Wakely
On 16 April 2018 at 21:08, Jonathan Wakely wrote: > On 16 April 2018 at 20:52, François Dumont wrote: >> Hi >> >> While working on something else on libstdc++ I started having a test >> failing because of the missing comma overload protection in deque.tcc. So I >> looked for other similar

Re: Protect from comma operator overload

2018-04-16 Thread Jonathan Wakely
On 16 April 2018 at 20:52, François Dumont wrote: > Hi > > While working on something else on libstdc++ I started having a test > failing because of the missing comma overload protection in deque.tcc. So I > looked for other similar places in the code and here is a patch to fix the > places I

[og7] Backport "[nvptx] Add exit after call to noreturn function"

2018-04-16 Thread Tom de Vries
Hi, while investigating PR85381 - "[og7, nvptx, openacc] parallel-loop-1.c fails with default vector length 128", I ran into PR 80035/81069. I've backported the fix to the og7 branch. Thanks, - Tom Backport "[nvptx] Add exit after call to noreturn function" 2018-04-16 Tom de Vries

[libgomp, testsuite] Use dg-set-target-env-var instead of setenv

2018-04-16 Thread Tom de Vries
Hi, given the stage1 approval for "[openacc, PR85411] Move GOMP_OPENACC_DIM parsing out of nvptx plugin", setenv for GOMP_OPENACC_DIM won't work on trunk anymore, so there's no sense in using it on the og7 branch. Committed as attached. [ We may want to commit that patch to og7 as well, but

Re: [PATCH], PR target/85358, Fix __ibm128 being converter to __float128 on PowerPC ISA 3.0 (power9)

2018-04-16 Thread Segher Boessenkool
Hi! On Mon, Apr 16, 2018 at 01:41:29PM -0400, Michael Meissner wrote: > As I was working on PR target/85075 (to flesh some bugs with IEEE 128-bit > support on the PowerPC, particularly with switching the default of long > double), I noticed that for explicit IBM extended double, the compiler was

Protect from comma operator overload

2018-04-16 Thread François Dumont
Hi     While working on something else on libstdc++ I started having a test failing because of the missing comma overload protection in deque.tcc. So I looked for other similar places in the code and here is a patch to fix the places I found.     Let me know if it is still time to commit.

[PATCH] Fix gen_lowpart_if_possible (PR middle-end/85414)

2018-04-16 Thread Jakub Jelinek
Hi! The following testcase FAILs, because cse_local sees (zero_extend:TI (subreg/s/v:DI (reg:TI ...) 0)) inside of REG_EQUAL note, and simplify-rtx.c attempts to optimize it. case ZERO_EXTEND: /* Check for a zero extension of a subreg of a promoted variable, where the promotion

Re: [C++ PATCH] Fix constexpr handling of >y (PR c++/84463)

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 09:28:43PM +0200, Jakub Jelinek wrote: > On the following new testcase we emit 2 different constexpr errors > because of premature folding, where the PR44100 hack which is supposed > to fold expressions like &((S *)0)->f or > &((S *)24)->f folds all the >y expressions if x

Re: [PATCH] PR 85075, Fix PowerPC __float182/__ibm128 types and mangling

2018-04-16 Thread Michael Meissner
On Mon, Apr 16, 2018 at 11:53:13AM -0500, Segher Boessenkool wrote: > Hi! > > Thank you for working on this. > > On Sun, Apr 15, 2018 at 03:50:44PM -0400, Michael Meissner wrote: > > PR target/85075 shows that there are some problems with the types for the 3 > > 128-bit floating point types on

[PATCH], Fix PR target/85424, PowerPC __builtin_packlongdouble bug discovered in PR target/85075

2018-04-16 Thread Michael Meissner
With the code changes in the patch for PR target/85075, I noticed that the PowerPC big-endian build stopped in building big endian, 32-bit libgcc when configured for power8. The issue was this latent bug. Segher asked me to re-submit the bug separately, and I'm doing this for PR target/85424.

Re: PING^3: [GCC 6] PATCH: Backport -mindirect-branch= patches

2018-04-16 Thread Jan Hubicka
> On Mon, Apr 2, 2018 at 5:06 AM, H.J. Lu wrote: > > On Mon, Mar 26, 2018 at 4:04 AM, H.J. Lu wrote: > >> On Mon, Mar 19, 2018 at 10:04 AM, H.J. Lu wrote: > > Here are GCC 6 patches to backport all -mindirect-branch=

Re: [PATCH] Handle empty infinite loops in OpenACC for PR84955

2018-04-16 Thread Tom de Vries
On 04/12/2018 08:58 PM, Jakub Jelinek wrote: On Thu, Apr 12, 2018 at 11:39:43AM -0700, Cesar Philippidis wrote: Strange. I didn't observe any regressions when I tested it. But, then again, I was testing against revision r259092 | jason | 2018-04-04 09:42:55 -0700 (Wed, 04 Apr 2018) | 4 lines

[PATCH], PR target/85358, Fix __ibm128 being converter to __float128 on PowerPC ISA 3.0 (power9)

2018-04-16 Thread Michael Meissner
As I was working on PR target/85075 (to flesh some bugs with IEEE 128-bit support on the PowerPC, particularly with switching the default of long double), I noticed that for explicit IBM extended double, the compiler was converting the __ibm128 type to an IEEE 128-bit type, because those types had

Re: [PATCH] Make redirection only for target_clones: V2 (PR ipa/85329).

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 04:01:18PM +0200, Martin Liška wrote: > >From 77b48cfad59dd24a5c068bfb32b1059535ae1f75 Mon Sep 17 00:00:00 2001 > From: marxin > Date: Sat, 14 Apr 2018 09:55:35 +0200 > Subject: [PATCH] Make redirection only for target_clones: V3 (PR ipa/85329). > >

PING^3: [GCC 6] PATCH: Backport -mindirect-branch= patches

2018-04-16 Thread H.J. Lu
On Mon, Apr 2, 2018 at 5:06 AM, H.J. Lu wrote: > On Mon, Mar 26, 2018 at 4:04 AM, H.J. Lu wrote: >> On Mon, Mar 19, 2018 at 10:04 AM, H.J. Lu wrote: Here are GCC 6 patches to backport all -mindirect-branch= patches.

Re: [PATCH] Improve IPA-CP handling of self-recursive calls

2018-04-16 Thread H.J. Lu
On Wed, Apr 11, 2018 at 2:20 AM, Jan Hubicka wrote: >> >> 2018-04-08 Martin Jambor >> >> PR ipa/84149 >> * ipa-cp.c (propagate_vals_across_pass_through): Expand comment. >> (cgraph_edge_brings_value_p): New parameter dest_val, check if it

Re: [PATCH] PR 85075, Fix PowerPC __float182/__ibm128 types and mangling

2018-04-16 Thread Segher Boessenkool
Hi! Thank you for working on this. On Sun, Apr 15, 2018 at 03:50:44PM -0400, Michael Meissner wrote: > PR target/85075 shows that there are some problems with the types for the 3 > 128-bit floating point types on the PowerPC: > > __float128 (and _Float128 in C, IEEE 128-bit) >

Re: [PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-16 Thread Carl Love
On Fri, 2018-04-13 at 17:53 -0500, Segher Boessenkool wrote: > Hi! > > On Fri, Apr 13, 2018 at 03:27:40PM -0700, Carl Love wrote: > > On Fri, 2018-04-13 at 16:54 -0500, Segher Boessenkool wrote: > > > On Fri, Apr 13, 2018 at 09:49:25AM -0700, Carl Love wrote: > > > > diff --git

[PATCH] Fix ICE with single element vector

2018-04-16 Thread Andreas Krebbel
I did run into an ICE with a single element vector triggered by dividing the number of elements by 2 with exact_div here: tree-vect-data-refs.c:5132 else { /* If length is not equal to 3 then only power of 2 is supported. */ gcc_assert (pow2p_hwi (count));

Re: [PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-16 Thread Jason Merrill
On Fri, Apr 13, 2018, 5:19 PM Alexandre Oliva wrote: > tinst_level objects are created during template instantiation, and > they're most often quite short-lived, but since there's no intervening > garbage collection, they accumulate throughout the pass while most by > far

Re: [PATCH, rs6000] Fix PR85080

2018-04-16 Thread Segher Boessenkool
Hi Bill, On Sun, Apr 15, 2018 at 09:41:04PM -0500, Bill Schmidt wrote: > PR85080 identifies a test case that started failing last year when > an improvement was made to the vectorizer. The failure turns out to > be appropriate. The test used to not expect the loop in the first > function to be

Re: [PATCH, openacc, PR85411] Move GOMP_OPENACC_DIM parsing out of nvptx plugin

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 11:41:35AM +0200, Tom de Vries wrote: > Hi, > > this patch moves the parsing of the GOMP_OPENACC_DIM environment variable > from the nvptx target plugin to the libgomp library. > > The variable is not part of the OpenACC standard, but it is specific for the > gcc

Re: [PATCH] Make redirection only for target_clones: V2 (PR ipa/85329).

2018-04-16 Thread Jan Hubicka
> 2018-04-16 Martin Liska > > * multiple_target.c (create_dispatcher_calls): Set apostrophes > for target_clone error message. Make default implementation > clone to be a local declaration. > (separate_attrs): Add new argument and check for an emptry

Re: [PATCH] Make redirection only for target_clones: V2 (PR ipa/85329).

2018-04-16 Thread Martin Liška
Hi. I'm sending V3 which we did with Honza. It's similar to V2, but properly makes FUNCTION_DECL local for default implementation. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Tests on ppc64le are running. Ready to be installed? Martin >From

RE: [wwwdocs] [COMMITTED] ARC gcc8 changes entry

2018-04-16 Thread Claudiu Zissulescu
Done. Thank you, Claudiu > -Original Message- > From: Bernhard Reutner-Fischer [mailto:rep.dot@gmail.com] > Sent: Thursday, April 12, 2018 8:40 PM > To: gcc-patches@gcc.gnu.org; Claudiu Zissulescu > ; gcc-patches@gcc.gnu.org > Cc: Gerald Pfeifer

[PATCH] Fix libgcc/config/i386/cpuinfo.c warnings (PR target/84945)

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 12:50:29PM +0200, Thomas Schwinge wrote: > > +#define set_feature(f) \ > > + if (f < 32) features |= (1U << f); else features2 |= (1U << (f - 32)) > >if (edx & bit_CMOV) > > -features |= (1 << FEATURE_CMOV); > > +set_feature (FEATURE_CMOV); > >

Re: [PATCH] Fix libgcc/config/i386/cpuinfo.c warnings (PR target/84945)

2018-04-16 Thread Uros Bizjak
On Mon, Apr 16, 2018 at 1:11 PM, Jakub Jelinek wrote: > On Mon, Apr 16, 2018 at 12:50:29PM +0200, Thomas Schwinge wrote: >> > +#define set_feature(f) \ >> > + if (f < 32) features |= (1U << f); else features2 |= (1U << (f - 32)) >> >if (edx & bit_CMOV) >> > -features |=

Re: [PATCH] Fix __builtin_cpu_supports (PR target/84945)

2018-04-16 Thread Thomas Schwinge
Hi! On Mon, 19 Mar 2018 20:35:56 +0100, Jakub Jelinek wrote: > --- libgcc/config/i386/cpuinfo.c.jj 2018-03-15 09:10:20.870075051 +0100 > +++ libgcc/config/i386/cpuinfo.c 2018-03-19 16:13:25.059481079 +0100 > @@ -231,78 +238,81 @@ get_available_features (unsigned int ecx

Patch ping

2018-04-16 Thread Jakub Jelinek
Hi! I'd like to ping the http://gcc.gnu.org/ml/gcc-patches/2018-04/msg00414.html PR85281 - assorted -masm=intel fixes patch. Thanks. Jakub

[PATCH, openacc, PR85411] Move GOMP_OPENACC_DIM parsing out of nvptx plugin

2018-04-16 Thread Tom de Vries
Hi, this patch moves the parsing of the GOMP_OPENACC_DIM environment variable from the nvptx target plugin to the libgomp library. The variable is not part of the OpenACC standard, but it is specific for the gcc implementation of OpenACC, so it makes sense to share the part handling the

Re: [PATCH i386: Check error_mark_node in multiversioning

2018-04-16 Thread Uros Bizjak
On Sun, Apr 15, 2018 at 12:55 PM, H.J. Lu wrote: > Since CET is applied to the whole program, it is correct to disallow > -fcf-protection=full without -mcet. But compiler shouldn't crash. > > OK for trunk? > > H.J. > > gcc/ > > PR target/85403 > *

Re: [PATCH i386: Check error_mark_node in multiversioning

2018-04-16 Thread Uros Bizjak
On Sun, Apr 15, 2018 at 12:55 PM, H.J. Lu wrote: > Since CET is applied to the whole program, it is correct to disallow > -fcf-protection=full without -mcet. But compiler shouldn't crash. I don't think this is correct approach. If CET appleis to the whole program, then it

Re: [PATCH] DWARF sort longer dirs before shorter ones in directory table.

2018-04-16 Thread Jakub Jelinek
On Mon, Apr 16, 2018 at 09:34:17AM +0200, Mark Wielaard wrote: > gcc/ChangeLog: > > * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before > shorter ones. Ok, thanks. Jakub

[PATCH] Make Filesystem TS tests pass in C++17 mode

2018-04-16 Thread Jonathan Wakely
The header defaults to using std::filesystem in C++17 mode. The Filesystem TS tests need to define the macro that causes std::experimental::filesystem to be used instead. This fixes the experimental/filesystem FAILs seen at: https://gcc.gnu.org/ml/gcc-testresults/2018-04/msg00986.html Tested

Re: [patch][i386] PR84331.

2018-04-16 Thread Uros Bizjak
On Mon, Apr 16, 2018 at 9:07 AM, Makhotina, Olga wrote: > Hi, > > This patch fixes g++.dg/ext/mv16.C test with -march=native. > > gcc/ > PR target/84331 > * gcc/config.gcc: Support "skylake". > * gcc/config/i386/i386-c.c

[PATCH] DWARF sort longer dirs before shorter ones in directory table.

2018-04-16 Thread Mark Wielaard
When gcc dwarf2out generates the .debug_line table itself (for example when generating one for a split DWARF .dwo) it uses natural sorting for the directory table. Longer directory paths come before shorter directory paths with the same prefix. This causes the files in the line table to pick the

[patch][i386] PR84331.

2018-04-16 Thread Makhotina, Olga
Hi, This patch fixes g++.dg/ext/mv16.C test with -march=native. gcc/ PR target/84331 * gcc/config.gcc: Support "skylake". * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE. * gcc/config/i386/i386.c (m_SKYLAKE): Define.