[PATCH] Fix PR85066 testcase for -mx32

2018-03-26 Thread Richard Biener
Committed. Richard. 2018-03-26 Richard Biener PR testsuite/85066 * gcc.dg/vect/costmodel/x86_64/costmodel-pr84986.c: Use long long instead of long. Index: testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr84986.c =

[PATCH, PR85063] Fix switch conversion in offloading functions

2018-03-26 Thread Tom de Vries
Hi, this patch fixes an ICE that occurs in lto1 after switch conversion triggers in an offloading function. Consider this OpenMP test-case: ... #include int main (void) { int n[1]; n[0] = 3; #pragma omp target { int m = n[0]; switch (m & 3) { case 0: m = 4; break;

Re: [PATCH, PR85063] Fix switch conversion in offloading functions

2018-03-26 Thread Jakub Jelinek
On Mon, Mar 26, 2018 at 11:05:52AM +0200, Tom de Vries wrote: > OK for stage4 or stage1? Ok for stage4, thanks. Just a small nit below. > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c/switch-conversion-2.c > @@ -0,0 +1,28 @@ No /* { dg-additional-options "-ftree-switch-conversion" } */ here

Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")

2018-03-26 Thread Paolo Carlini
Hi, On 23/03/2018 13:39, Jason Merrill wrote: On Fri, Mar 23, 2018 at 6:13 AM, Paolo Carlini wrote: On 22/03/2018 23:26, Jason Merrill wrote: On Thu, Mar 22, 2018 at 5:39 PM, Paolo Carlini wrote: ... with patch ;) If you are curious where the heck that INDIRECT_REF is coming from, is comin

Re: [PATCH] Fix ICE for static vars in offloaded functions

2018-03-26 Thread Tom de Vries
On 03/07/2018 04:01 PM, Richard Biener wrote: On Wed, 7 Mar 2018, Tom de Vries wrote: On 03/07/2018 02:29 PM, Richard Biener wrote: On Wed, 7 Mar 2018, Jakub Jelinek wrote: On Wed, Mar 07, 2018 at 02:20:26PM +0100, Tom de Vries wrote: Fix ICE for static vars in offloaded functions 2018-03-

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

2018-03-26 Thread H.J. Lu
On Mon, Mar 19, 2018 at 10:04 AM, H.J. Lu wrote: >> >> Here are GCC 6 patches to backport all -mindirect-branch= patches. >> OK for GCC 6. >> > PING: https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00884.html -- H.J.

PING^3 [PATCH] i386: Avoid PLT when shadow stack is enabled directly

2018-03-26 Thread H.J. Lu
On Sat, Mar 17, 2018 at 5:55 AM, H.J. Lu wrote: > On Fri, Dec 8, 2017 at 5:02 AM, H.J. Lu wrote: >> On Tue, Oct 24, 2017 at 5:31 AM, H.J. Lu wrote: >>> PLT should be avoided with shadow stack in 32-bit mode if more than 2 >>> parameters are passed in registers since only 2 parameters can be pass

PING^4: [PATCH] i386: Insert ENDBR before the profiling counter call

2018-03-26 Thread H.J. Lu
On Fri, Jan 26, 2018 at 6:23 AM, H.J. Lu wrote: > On Sun, Jan 7, 2018 at 7:11 PM, H.J. Lu wrote: >> On Tue, Oct 24, 2017 at 10:58 AM, H.J. Lu wrote: >>> On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: "H.J. Lu" writes: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr82

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

2018-03-26 Thread H.J. Lu
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, 2017 at 5:25 PM, H.J. Lu wrote: >>> config/plugins.m4 has >>> >>> if test "$plugins" = "yes"; then >>> AC_SEARCH_LIBS([dlopen], [dl]) >>> fi >>> >>> Plugin uses dlsym, but

Re: [C++ Patch] Fix confusing diagnostics for invalid overrides

2018-03-26 Thread Nathan Sidwell
On 03/25/2018 10:18 AM, Volker Reichelt wrote: Index: gcc/cp/search.c === --- gcc/cp/search.c    (revision 258835) +++ gcc/cp/search.c    (working copy) @@ -1918,12 +1918,14 @@    if (fail == 1) {   error ("invalid

Add workaround to std::variant for Clang bug 31852

2018-03-26 Thread Jonathan Wakely
This makes it possible to use our std::variant with Clang, as well as some minor tweaks to avoid ADL (so the compiler doesn't waste time looking in associated namespaces) and adjust whitespace. * include/std/variant (__get): Qualify calls to avoid ADL. (__select_index): Adjust whites

Re: Add workaround to std::variant for Clang bug 31852

2018-03-26 Thread Jonathan Wakely
Now with 100% more patch. On 26 March 2018 at 14:10, Jonathan Wakely wrote: > This makes it possible to use our std::variant with Clang, as well as > some minor tweaks to avoid ADL (so the compiler doesn't waste time > looking in associated namespaces) and adjust whitespace. > >* includ

Re: [og7] vector_length extension part 4: target hooks and automatic parallelism

2018-03-26 Thread Tom de Vries
On 03/02/2018 08:18 PM, Cesar Philippidis wrote: diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index ba3f4317f4e..f15ce6b8f8d 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -626,7 +626,8 @@ oacc_parse_default_dims (const char *dims) function. */ static void -oacc_valid

Re: [og7] vector_length extension part 4: target hooks and automatic parallelism

2018-03-26 Thread Cesar Philippidis
On 03/26/2018 07:14 AM, Tom de Vries wrote: > On 03/02/2018 08:18 PM, Cesar Philippidis wrote: >> diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c >> index ba3f4317f4e..f15ce6b8f8d 100644 >> --- a/gcc/omp-offload.c >> +++ b/gcc/omp-offload.c >> @@ -626,7 +626,8 @@ oacc_parse_default_dims (const c

C++ PATCH for c++/85049, ICE with integer_sequence

2018-03-26 Thread Jason Merrill
In this testcase, we tried to deduce template arguments between __integer_pack(sizeof...(_Types)) and an empty argument list. This breaks, and we shouldn't try anyway, since that's very much a non-deduced context. So let's skip over packs that aren't actual template parameter packs. Tested x86_6

Re: [PATCHv2] PR libstdc++/84654 Do not use __float128 if it is disabled by the compiler

2018-03-26 Thread Tulio Magno Quites Machado Filho
Ping? Tulio Magno Quites Machado Filho writes: > Changes since v1: > - Completely rewrite of the patch to set ENABLE_FLOAT128 at libstdc++ >build time and undef _GLIBCXX_USE_FLOAT128 when building user code. > > --- 8< --- > > In order to use __float128 in C++ it's necessary to check if the

RE: [PATCH] i386: Insert ENDBR to trampoline for -fcf-protection=branch -mibt

2018-03-26 Thread Tsimbalist, Igor V
> -Original Message- > From: Lu, Hongjiu > Sent: Sunday, March 25, 2018 12:50 AM > To: gcc-patches@gcc.gnu.org; Uros Bizjak ; Tsimbalist, > Igor V > Subject: [PATCH] i386: Insert ENDBR to trampoline for -fcf- > protection=branch -mibt > > When -fcf-protection=branch -mibt are used, we nee

C++ PATCH for c++/85062, ICE with variadic alignas in wrong place

2018-03-26 Thread Jason Merrill
We've been passing C++11 attributes that appertain to a type-specifier down to decl_attributes, which gave a warning and ignored them, but it was confused by the pack expansion. It seems easiest to deal with this by ignoring them directly in grokdeclarator. Tested x86_64-pc-linux-gnu, applying to

Re: [PATCH] i386: Insert ENDBR to trampoline for -fcf-protection=branch -mibt

2018-03-26 Thread H.J. Lu
On Mon, Mar 26, 2018 at 8:23 AM, Tsimbalist, Igor V wrote: >> -Original Message- >> From: Lu, Hongjiu >> Sent: Sunday, March 25, 2018 12:50 AM >> To: gcc-patches@gcc.gnu.org; Uros Bizjak ; Tsimbalist, >> Igor V >> Subject: [PATCH] i386: Insert ENDBR to trampoline for -fcf- >> protection=b

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Jason Merrill
On Sat, Mar 24, 2018 at 4:51 AM, Andreas Schwab wrote: > On Mär 23 2018, Jason Merrill wrote: > >> diff --git a/gcc/testsuite/g++.dg/asan/asan.exp >> b/gcc/testsuite/g++.dg/asan/asan.exp >> index 4ee8dd98697..a22d2ac5e20 100644 >> --- a/gcc/testsuite/g++.dg/asan/asan.exp >> +++ b/gcc/testsuite/g

Re: [og7] vector_length extension part 4: target hooks and automatic parallelism

2018-03-26 Thread Tom de Vries
On 03/02/2018 08:18 PM, Cesar Philippidis wrote: introduces a new goacc adjust_parallelism target hook. That's another separate patch. Committed. Thanks, - Tom [openacc] Add target hook TARGET_GOACC_ADJUST_PARALLELISM 2018-03-26 Cesar Philippidis Tom de Vries * doc/tm.texi.in: Ad

Re: C++ PATCH for c++/85062, ICE with variadic alignas in wrong place

2018-03-26 Thread Jason Merrill
On Mon, Mar 26, 2018 at 11:57 AM, Jason Merrill wrote: > We've been passing C++11 attributes that appertain to a type-specifier > down to decl_attributes, which gave a warning and ignored them, but it > was confused by the pack expansion. It seems easiest to deal with > this by ignoring them dire

Re: [og7] vector_length extension part 4: target hooks and automatic parallelism

2018-03-26 Thread Tom de Vries
On 03/02/2018 08:18 PM, Cesar Philippidis wrote: The attached patch adjusts the existing goacc validate_dims target hook This is overkill. All we need is a function "int oacc_get_default_dim (int dim)". Thanks, - Tom

Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")

2018-03-26 Thread Jason Merrill
On Mon, Mar 26, 2018 at 5:19 AM, Paolo Carlini wrote: > On 23/03/2018 13:39, Jason Merrill wrote: >> On Fri, Mar 23, 2018 at 6:13 AM, Paolo Carlini >> wrote: >>> >>> On 22/03/2018 23:26, Jason Merrill wrote: On Thu, Mar 22, 2018 at 5:39 PM, Paolo Carlini wrote: > > ..

Re: C++ PATCH for c++/85032, rejects-valid with if constexpr in template

2018-03-26 Thread Jason Merrill
On Sat, Mar 24, 2018 at 6:59 AM, Marek Polacek wrote: > Recently the code in finish_static_assert was changed to use > perform_implicit_conversion_flags followed by fold_non_dependent_expr. That > broke this test becase when in a template, p_i_c_f merely wraps the expr in > an IMPLICIT_CONV_EXPR.

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Andreas Schwab
On Mär 26 2018, Jason Merrill wrote: > On Sat, Mar 24, 2018 at 4:51 AM, Andreas Schwab wrote: >> On Mär 23 2018, Jason Merrill wrote: >> >>> diff --git a/gcc/testsuite/g++.dg/asan/asan.exp >>> b/gcc/testsuite/g++.dg/asan/asan.exp >>> index 4ee8dd98697..a22d2ac5e20 100644 >>> --- a/gcc/testsuit

Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")

2018-03-26 Thread Paolo Carlini
Hi, On 26/03/2018 19:12, Jason Merrill wrote: Your build_aggr_init change is OK, but I had in mind something more general in build_vec_init: Oh nice. Shall I test it together with my build_aggr_type bits and the testcases and commit it if everything is Ok? By the way - FYI - what I had tested

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Jason Merrill
On Mon, Mar 26, 2018 at 1:31 PM, Andreas Schwab wrote: > On Mär 26 2018, Jason Merrill wrote: > >> On Sat, Mar 24, 2018 at 4:51 AM, Andreas Schwab >> wrote: >>> On Mär 23 2018, Jason Merrill wrote: >>> diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.

Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")

2018-03-26 Thread Jason Merrill
On Mon, Mar 26, 2018 at 1:57 PM, Paolo Carlini wrote: > Hi, > > On 26/03/2018 19:12, Jason Merrill wrote: >> >> Your build_aggr_init change is OK, but I had in mind something more >> general in build_vec_init: > > Oh nice. Shall I test it together with my build_aggr_type bits and the > testcases a

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Andreas Schwab
On Mär 26 2018, Jason Merrill wrote: > if [catch {exec sh ulimit -v} ulimit_v] { expect1.1> exec sh ulimit -v sh: ulimit: No such file or directory while executing "exec sh ulimit -v" Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Andreas Schwab
On Mär 26 2018, Jakub Jelinek wrote: > On Mon, Mar 26, 2018 at 08:33:41PM +0200, Andreas Schwab wrote: >> On Mär 26 2018, Jason Merrill wrote: >> >> > if [catch {exec sh ulimit -v} ulimit_v] { >> >> expect1.1> exec sh ulimit -v >> sh: ulimit: No such file or directory >> while executin

[RFC PATCH for 9] rs6000: Ordered comparisons (PR56864)

2018-03-26 Thread Segher Boessenkool
This implements ordered comparisons for most floating point variants. It does not yet implement it for XL-compatible FP comparisons. I do not yet know if it works correctly for emulated 128-bit IEEE FP. There should not be performance impact, but I haven't tested it thoroughly yet. Segher

libgo patch committed: Don't check for a stale runtime

2018-03-26 Thread Ian Lance Taylor
The runtime tests, as expected by the gotools testsuite, check whether the runtime package is stale. The gccgo runtime package can never be stale, and checking for staleness can cause confusion if it winds up checking the gc package instead. Skip the test for gccgo. Bootstrapped and ran Go testsu

[PATCH, i386]: Fix PR 85073: extra check after BLSR

2018-03-26 Thread Uros Bizjak
2018-03-26 Uros Bizjak PR target/85073 * config/i386/i386.md (*bmi_blsr__cmp): New insn pattern. (*bmi_blsr__ccz): Ditto. testsuite/ChangeLog: 2018-03-26 Uros Bizjak PR target/85073 * gcc.target/i386/pr85073.c: New test. Bootstrapped and regression tested on x86_64-li

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Jason Merrill
On Mon, Mar 26, 2018 at 2:55 PM, Andreas Schwab wrote: > On Mär 26 2018, Jakub Jelinek wrote: >> On Mon, Mar 26, 2018 at 08:33:41PM +0200, Andreas Schwab wrote: >>> On Mär 26 2018, Jason Merrill wrote: >>> >>> > if [catch {exec sh ulimit -v} ulimit_v] { >>> >>> expect1.1> exec sh ulimit -v >

Re: RFC: Disable asan tests under ulimit -v

2018-03-26 Thread Jakub Jelinek
On Mon, Mar 26, 2018 at 08:33:41PM +0200, Andreas Schwab wrote: > On Mär 26 2018, Jason Merrill wrote: > > > if [catch {exec sh ulimit -v} ulimit_v] { > > expect1.1> exec sh ulimit -v > sh: ulimit: No such file or directory > while executing > "exec sh ulimit -v" Perhaps if [catch

RE: [PATCH] i386: Insert ENDBR to trampoline for -fcf-protection=branch -mibt

2018-03-26 Thread Tsimbalist, Igor V
> -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Monday, March 26, 2018 5:59 PM > To: Tsimbalist, Igor V > Cc: gcc-patches@gcc.gnu.org; Uros Bizjak > Subject: Re: [PATCH] i386: Insert ENDBR to trampoline for -fcf- > protection=branch -mibt > > On Mon, Mar 26, 201

[PATCH, fortran] PR85083 - [8 Regression] ICE in gfc_convert_to_structure_constructor, at fortran/primary.c:2915

2018-03-26 Thread Harald Anlauf
The attached obvious one-liner adds a missing check for type compatibility in a structure constructor. Testcase from report. Changelogs below. Regtested on i686-pc-linux-gnu. Whoever reviews this, please feel free to commit. Thanks, Harald 2018-03-26 Harald Anlauf PR fortran/85083

[PATCH,nvptx] Fix PR85056

2018-03-26 Thread Cesar Philippidis
As noted in PR85056, the nvptx BE isn't declaring external arrays using PTX array notation. Specifically, it's emitting code that's missing the empty angle brackets '[]'. This patch corrects that problem. Tom, in contrast to my earlier patch in the PR, this patch only considers external arrays. Th

[PATCH, rtl] Fix PR84878: Segmentation fault in add_cross_iteration_register_deps

2018-03-26 Thread Peter Bergner
PR84878 shows an example where we segv while creating data dependence edges for SMS. ddg.c:add_cross_iteration_register_deps(): /* Create inter-loop true dependences and anti dependences. */ for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next) { rtx_insn *use_i