Re: [PATCH][GCC] Fix oversized shifts in PR/88903 testcase.

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Tamar Christina wrote: > Hi All, > > The testcase for PR/tree-optimization 88903 hits > undefined behavior for the overwide shifts. This is > causing the testcases to fail for all Arm platforms. > > This updates the testcase to add an explicit & such > that the behavior is

Re: [PATCH] Fix latent SLP bugs and a memleak

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Richard Sandiford wrote: > Richard Biener writes: > > @@ -5742,8 +5740,14 @@ vectorize_fold_left_reduction (stmt_vec_info > > stmt_info, > >auto_vec vec_oprnds0; > >if (slp_node) > > { > > - vect_get_vec_defs (op0, NULL_TREE, stmt_info, &vec_oprnds0, NULL,

Re: [PATCH] Fix block copy/move/compare expansion (PR rtl-optimization/86334, PR target/88906)

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Jakub Jelinek wrote: > Hi! > > Apparently RTL DSE doesn't perform any kind of escape analysis for e.g. > frame pointer related addresses, instead relies on TREE_ADDRESSABLE being > set on MEM_EXPR VAR_DECLs if the address could leak to other functions. > > Since PR49454 expr

Re: [PATCH] Fix REG_EQUAL notes for doubleword POPCOUNT etc. unops (PR target/88905)

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Jakub Jelinek wrote: > Hi! > > add_equal_note has special code to handle properly doubleword POPCOUNT and > similar builtins, e.g. for POPCOUNT if we don't have DImode POPCOUNT, it can > be expanded as 2 SImode POPCOUNTs added together, but for the REG_EQUAL note > we want lo

Re: [PATCH] Fix up thread_jump handling of jumps with clobbers (PR rtl-optimization/88904)

2019-01-22 Thread Richard Biener
On Mon, 21 Jan 2019, Jakub Jelinek wrote: > Hi! > > The following patch is miscompiled on arm thumb1, where there is > (jump_insn 32 31 33 4 (parallel [ > (set (pc) > (if_then_else (ne (zero_extract:SI (reg:SI 3 r3 [orig:127 > ret+8 ] [127]) >

[PATCH] luoxhu - backport from trunk r255555:

2019-01-22 Thread luoxhu
From: carll backport from trunk to gcc-7-branch. gcc/ChangeLog: 2017-12-11 Carl Love * config/rs6000/altivec.h (vec_extract_fp32_from_shorth, vec_extract_fp32_from_shortl]): Add #defines. * config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion. *

Re: libgo patch committed: Update to Go1.12beta2

2019-01-22 Thread Uros Bizjak
Hello! > I have committed a patch to update libgo to the Go 1.12beta2 release. > > As usual this sort of update is too large to include all changes in > this e-mail. I've included changes to gccgo-specific files below. > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > to

Re: [PATCH] sched-ebb.c: avoid moving table jumps (PR rtl-optimization/88423)

2019-01-22 Thread Steven Bosscher
On Fri, Jan 18, 2019 at 5:43 PM David Malcolm wrote: > (1) What does GCC mean by "ebb" in this context? In this context, the EBB is what Muchnick would call a trace. Ciao! Steven

Re: testsuite dg-directives glitches

2019-01-22 Thread Manfred Schwarb
Dominique, thanks a lot. I got the request to share my script, so I attached it to this mail. Be aware that the script reports numerous false positives. As one can expect, also gcc.dg would appreciate some love... While cleaning up the script, I found some refinements, and another 7 glitches, see

Re: [PATCH]i386: Add BDESC2 for ix86_isa_flags2 and refine all related.

2019-01-22 Thread Uros Bizjak
On Tue, Jan 22, 2019 at 7:57 AM Hongtao Liu wrote: > This is adjusted patch: Modify BDESC to accept two flags and merge > ARGS2/SPEICAL_ARGS2 into ARGS/SPECIAL_ARGS. > Bootstrap test is ok, no regression on x86 backend testcases. > > Changelog: > --- > gcc/ > > 2019-01-21 Hongtao Liu > H.J.

Re: [PATCH] Fix transfer_intrinsic_3.f90 miscompilation on ppc*/s390* (PR tree-optimization/88044)

2019-01-22 Thread Richard Biener
On Fri, 18 Jan 2019, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, on the transfer_intrinsic_3.f90 testcase at -O3 > on a few targets we have in number_of_iterations_cond: > code LE_EXPR > iv0->base 0 > iv0->step 0 > iv1->base -1 > iv1->step 1 > every_iteration false > > The loop starts

[PATCH] Fix PR88422

2019-01-22 Thread Richard Biener
The following patch from Nidal Faour fixes LTO issues on windows. Thanks for tracking this down. Aplied to trunk and GCC 8 branch. Richard. 2019-01-22 Nidal Faour PR lto/88422 * simple-object.c (O_BINARY): Define if not already defined. (simple_object_copy_lto_debu

UNSPEC related notes and libbacktrace (was: [PATCH] Silence some dwarf2out UNSPEC related notes (PR debug/88723))

2019-01-22 Thread Gerald Pfeifer
On Mon, 7 Jan 2019, Jakub Jelinek wrote: > Apparently my recent patch turned on many non-delegitimized UNSPEC notes > (it is checking only note, goes away in release builds, but anyway). I've been seeing the following in my testsuite runs which I didn't get a month or so ago. Are these due to you

Re: [PATCH, d] Committed merge with upstream dmd

2019-01-22 Thread Andreas Schwab
In file included from ../../gcc/d/d-system.h:23, from ../../gcc/d/dmd/root/dsystem.h:24, from ../../gcc/d/dmd/mtype.c:11: ../../gcc/d/dmd/mtype.c: In member function 'Identifier* Type::getTypeInfoIdent()': ../../gcc/d/dmd/mtype.c:2329:33: error: comparison of inte

[SPARC] Fix more UNSPEC notes during libgo build

2019-01-22 Thread Eric Botcazou
There were a couple of issues in the code for mov{si,di}_pic_label_ref in sparc_delegitimize_address: it wouldn't recognize the GOT register and it wouldn't recognize a decoded HIGH/LO_SUM combination. Tested on SPARC/Solaris 11, applied on the mainline. 2019-01-22 Eric Botcazou *

Re: [patch] Document AMD GCN features.

2019-01-22 Thread Andrew Stubbs
On 21/01/2019 18:03, Jeff Law wrote: 2019-01-18 Andrew Stubbs gcc/ * doc/extend.tex (AMD GCN Function Attributes): New section. * doc/install.texi (amdgcn-unknown-amdhsa): New instructions. * doc/invoke.texi (AMD GCN Options): New section. * doc/md.texi

Re: Fortran vector math header

2019-01-22 Thread Martin Liška
On 1/21/19 3:25 PM, Joseph Myers wrote: > On Mon, 21 Jan 2019, Martin Liška wrote: > >> I like the if('lp64'), if('ilp32') approach and I'm sending patch >> candidate for that. Would it be accepted by glibc folks? > > Since glibc supports libmvec for x86_64, both 64-bit and x32, but not for > 3

Re: Fortran vector math header

2019-01-22 Thread Jakub Jelinek
On Tue, Jan 22, 2019 at 12:01:29PM +0100, Martin Liška wrote: > I discussed with Jakub possibility of generating canonical triples that will > be then used in Fortran FE to filter the 'GCC$ builtin' directives. However, > the approach bring some possibilities and thus I enhanced the previous > vers

[PATCH] Fix PR88862

2019-01-22 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-01-22 Richard Biener PR tree-optimization/88862 * graphite-scop-detection.c (scop_detection::graphite_can_represent_scev): Reject ADDR_EXPR. Index: gcc/graphite-scop-detection.c

Re: Change static chain from r18 to r9 (not r11) on aarch64

2019-01-22 Thread Olivier Hainque
Hi Wilco, > On 23 Dec 2018, at 12:09, Olivier Hainque wrote: > >> Remember these are just temporaries for use in the prolog and epilog - >> there is no need to save/restore the static base. Setting static chain >> to x9 and the temporaries to x10/x11 is the simplest solution. We >> can separatel

Re: [PATCH] introduce effective-target fold_memcpy

2019-01-22 Thread Richard Biener
On Mon, Jan 21, 2019 at 9:23 PM Martin Sebor wrote: > > On 1/21/19 1:18 AM, Richard Biener wrote: > > On Sat, Jan 19, 2019 at 12:25 AM Martin Sebor wrote: > >> > >> Some of the -Warray-bounds and -Wrestrict tests are prone to failing > >> on targets like arm-eabi and others that use different par

Re: V3 [PATCH] i386: Add pass_remove_partial_avx_dependency

2019-01-22 Thread Richard Biener
On Mon, Jan 21, 2019 at 10:27 PM H.J. Lu wrote: > > On Mon, Jan 21, 2019 at 10:54 AM Jeff Law wrote: > > > > On 1/7/19 6:55 AM, H.J. Lu wrote: > > > On Sun, Dec 30, 2018 at 8:40 AM H.J. Lu wrote: > > >> On Wed, Nov 28, 2018 at 12:17 PM Jeff Law wrote: > > >>> On 11/28/18 12:48 PM, H.J. Lu wrote

Re: [PATCH, OpenACC] Properly handle wait clause with no arguments

2019-01-22 Thread Thomas Schwinge
Hi Chung-Lin! On Mon, 14 Jan 2019 21:56:05 +0800, Chung-Lin Tang wrote: > this version of the wait-clause-with-no-args patch revises the following: > > (1) The way the Fortran FE parts are implemented, which essentially is your > code. > (I'll reflect that in the final ChangeLog) > > (2) Inst

Re: Fortran vector math header

2019-01-22 Thread Richard Biener
On Tue, Jan 22, 2019 at 12:15 PM Jakub Jelinek wrote: > > On Tue, Jan 22, 2019 at 12:01:29PM +0100, Martin Liška wrote: > > I discussed with Jakub possibility of generating canonical triples that will > > be then used in Fortran FE to filter the 'GCC$ builtin' directives. However, > > the approach

Re: testsuite dg-directives glitches

2019-01-22 Thread Dominique d'Humières
> Le 22 janv. 2019 à 10:02, Manfred Schwarb a écrit : > > Dominique, thanks a lot. > > I got the request to share my script, so I attached it to this mail. > Be aware that the script reports numerous false positives. > As one can expect, also gcc.dg would appreciate some love… I had a quick

Re: V3 [PATCH] i386: Add pass_remove_partial_avx_dependency

2019-01-22 Thread H.J. Lu
On Tue, Jan 22, 2019 at 4:08 AM Richard Biener wrote: > > On Mon, Jan 21, 2019 at 10:27 PM H.J. Lu wrote: > > > > On Mon, Jan 21, 2019 at 10:54 AM Jeff Law wrote: > > > > > > On 1/7/19 6:55 AM, H.J. Lu wrote: > > > > On Sun, Dec 30, 2018 at 8:40 AM H.J. Lu wrote: > > > >> On Wed, Nov 28, 2018 a

[PATCH] i386: Load external function address via GOT slot

2019-01-22 Thread H.J. Lu
With noplt attribute, we load the external function address via the GOT slot so that linker won't create an PLT entry for extern function address. gcc/ PR target/88954 * config/i386/i386.c (ix86_force_load_from_GOT_p): Also check noplt attribute. gcc/testsuite/ P

Re: [PATCH] i386: Load external function address via GOT slot

2019-01-22 Thread Uros Bizjak
On Tue, Jan 22, 2019 at 2:41 PM H.J. Lu wrote: > > With noplt attribute, we load the external function address via the GOT > slot so that linker won't create an PLT entry for extern function address. > > gcc/ > > PR target/88954 > * config/i386/i386.c (ix86_force_load_from_GOT_p):

[PATCH] Refine -Waddress-of-packed-member once more

2019-01-22 Thread Bernd Edlinger
Hi, unfortunately there are some more issues with -Waddress-of-packed-member, that show that my previous patch was not yet complete. That is a bogus warning, in C and C++ (see addition in test case 1), and a couple of missing warnings in C++ (test case 2). The latter warning regressions were a

Re: [arm][RFC] PR target/88469 fix incorrect argument passing with 64-bit bitfields

2019-01-22 Thread Richard Earnshaw (lists)
After discussions with Jakub on IRC, I've committed this patch along with a couple of other tweaks to the testsuite. New ChangeLog below. This issue has existed since GCC-6 but has only come to light following the release of gcc-8 where code was added to the compiler sources that exposed the bug.

Mitigation for PR target/88469 on arm-based systems bootstrapping with gcc-6/7/8

2019-01-22 Thread Richard Earnshaw (lists)
This patch, for gcc 8/9 is a mitigation patch for PR target/88469 where gcc-6/7/8 miscompile a structure whose alignment is dominated by a 64-bit bitfield member. Since the PCS rules for such a type must ignore any overalignment of the base type we cannot address this by simply adding a larger ali

Re: [PATCH]i386: Add BDESC2 for ix86_isa_flags2 and refine all related.

2019-01-22 Thread H.J. Lu
On Tue, Jan 22, 2019 at 1:27 AM Uros Bizjak wrote: > > On Tue, Jan 22, 2019 at 7:57 AM Hongtao Liu wrote: > > > This is adjusted patch: Modify BDESC to accept two flags and merge > > ARGS2/SPEICAL_ARGS2 into ARGS/SPECIAL_ARGS. > > Bootstrap test is ok, no regression on x86 backend testcases. > >

Re: [PATCH] Refine -Waddress-of-packed-member once more

2019-01-22 Thread H.J. Lu
On Tue, Jan 22, 2019 at 6:10 AM Bernd Edlinger wrote: > > Hi, > > unfortunately there are some more issues with -Waddress-of-packed-member, > that show that my previous > patch was not yet complete. > > That is a bogus warning, in C and C++ (see addition in test case 1), and a > couple of missin

Re: [arm][RFC] PR target/88469 fix incorrect argument passing with 64-bit bitfields

2019-01-22 Thread Jakub Jelinek
On Tue, Jan 22, 2019 at 02:10:59PM +, Richard Earnshaw (lists) wrote: > @@ -6630,6 +6633,13 @@ arm_needs_doubleword_align (machine_mode mode, > const_tree type) >Make sure we can warn about that with -Wpsabi. */ > ret = -1; >} > +else if (TREE_CODE (field) == F

[PATCH 0/7, OpenACC, libgomp, v5, stage1] Async re-work

2019-01-22 Thread Chung-Lin Tang
Hi, this is a rebase to current trunk and re-submission of the OpenACC Async re-organization work, aiming to commit when stage1 re-opens. This is technically the 2nd time I'm sending this whole patch series, but because I've named partial revisions up to v4 by now, for clarity I will just call thi

[PATCH 1/7, OpenACC, libgomp, v5, stage1] Async re-work, interfaces

2019-01-22 Thread Chung-Lin Tang
This patch separates out the header interface changes. A new GOMP_PLUGIN_IF_VERSION symbol has been defined in include/gomp-constants.h, specifically for versioning the plugin-interface. Corresponding places in libgomp has been updated, leaving GOMP_VERSION* only for the libgomp proper/offload

[PATCH 2/7, OpenACC, libgomp, v5, stage1] Async re-work, other accel target updates

2019-01-22 Thread Chung-Lin Tang
This patch updates the 'version' libgomp plugin hook for intelmic and hsa to return GOMP_PLUGIN_IF_VERSION instead of GOMP_VERSION. Thanks, Chung-Lin liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_version): Update to return GOMP_PLUGIN_IF_VERSION. libgomp/

[PATCH 3/7, OpenACC, libgomp, v5, stage1] Async re-work, libgomp/oacc-* changes

2019-01-22 Thread Chung-Lin Tang
Hi Thomas, in this patch, the issue on the synchronize/serialize hooks should be resolved; all call sites should now handle the failing case. As for the host _construct hook issue, I went your suggestion and used 0x... as the dummy, the NULL pointer is still used for error here. I mentioned o

[PATCH 4/7, OpenACC, libgomp, v5, stage1] Async re-work, acc_get/set_default_async API interface parts

2019-01-22 Thread Chung-Lin Tang
Hi Thomas, This patch adds the OpenACC 2.5 new APIs of acc_get_default_async/acc_set_default_async, contained are the modifications for Fortran in libgomp/openacc.f90, libgomp/openacc_lib.h. Not much is changed since the last submission of this part, except that the libgomp.map part is moved t

[PATCH 5/7, OpenACC, libgomp, v5, stage1] Async re-work, libgomp/target.c changes

2019-01-22 Thread Chung-Lin Tang
Hi Jakub, Since the last revision, the main change is that I've added at your request, __builtin_expect (aq != NULL, 0) as the if-condition in gomp_copy_host2dev/dev2host. Stashing the aq pointer into the coalesce-buf didn't match very well, as the cbuf argument was sometimes null and didn't alw

[PATCH 6/7, OpenACC, libgomp, v5, stage1] Async re-work, testsuite changes

2019-01-22 Thread Chung-Lin Tang
Hi Thomas, These are the testsuite changes. After the last review round, the amount of additional changes have been greatly reduced. Thanks, Chung-Lin * testsuite/libgomp.oacc-c-c++-common/asyncwait-2.c: New testcase. * testsuite/libgomp.oacc-c-c++-common/lib-81.c: Adjust testcase. *

[PATCH 7/7, OpenACC, libgomp, v5, stage1] Async re-work, nvptx parts

2019-01-22 Thread Chung-Lin Tang
Hi Tom, the nvptx parts are mostly still the same since the last update, except the GOMP_OFFLOAD_version() hook has been updated to return the new GOMP_PLUGIN_IF_VERSION symbol. Thanks, Chung-Lin * plugin/plugin-nvptx.c (struct cuda_map): Remove. (struct ptx_stream): Remove. (struct

Re: Mitigation for PR target/88469 on arm-based systems bootstrapping with gcc-6/7/8

2019-01-22 Thread Richard Biener
On Tue, 22 Jan 2019, Richard Earnshaw (lists) wrote: > This patch, for gcc 8/9 is a mitigation patch for PR target/88469 where > gcc-6/7/8 miscompile a structure whose alignment is dominated by a > 64-bit bitfield member. Since the PCS rules for such a type must ignore > any overalignment of the

Re: testsuite dg-directives glitches

2019-01-22 Thread Manfred Schwarb
Am 22.01.2019 um 14:21 schrieb Dominique d'Humières: > > >> Le 22 janv. 2019 à 10:02, Manfred Schwarb a écrit : >> >> Dominique, thanks a lot. >> >> I got the request to share my script, so I attached it to this mail. >> Be aware that the script reports numerous false positives. >> As one can ex

Re: [gofrontend-dev] Re: libgo patch committed: Update to Go1.12beta2

2019-01-22 Thread Ian Lance Taylor
On Tue, Jan 22, 2019 at 12:46 AM Uros Bizjak wrote: > > > I have committed a patch to update libgo to the Go 1.12beta2 release. > > > > As usual this sort of update is too large to include all changes in > > this e-mail. I've included changes to gccgo-specific files below. > > > > Bootstrapped an

Re: Mitigation for PR target/88469 on arm-based systems bootstrapping with gcc-6/7/8

2019-01-22 Thread Richard Earnshaw (lists)
On 22/01/2019 15:20, Richard Biener wrote: > On Tue, 22 Jan 2019, Richard Earnshaw (lists) wrote: > >> This patch, for gcc 8/9 is a mitigation patch for PR target/88469 where >> gcc-6/7/8 miscompile a structure whose alignment is dominated by a >> 64-bit bitfield member. Since the PCS rules for s

Re: Mitigation for PR target/88469 on arm-based systems bootstrapping with gcc-6/7/8

2019-01-22 Thread Jakub Jelinek
On Tue, Jan 22, 2019 at 02:43:38PM +, Richard Earnshaw (lists) wrote: > PR target/88469 > * profile-count.h (profile_count): Add dummy file with 64-bit alignment > on arm-based systems using gcc-6/7/8. > > diff --git a/gcc/profile-count.h b/gcc/profile-count.h > index c83fa3

[PATCH] PR libstdc++/88740 Print assertion messages to stderr

2019-01-22 Thread Jonathan Wakely
Messages printed to stdout might be lost when the process terminates via abort(), because output streams aren't flushed. Write to stderr instead (if stderr is defined by ). PR libstdc++/88740 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to write to std

[PATCH,GDC] Add netbsd support to GDC

2019-01-22 Thread Maya Rashish
libphobos/libdruntime changes were contributed upstream: https://github.com/dlang/druntime/pull/2472 (caveat: pending a change to netbsd/execinfo.d) One missing patch is needed for GDC to work. gcc/config.gcc (*-*-netbsd*): add netbsd-d.o gcc/config/t-netbsd: add netbsd-d.o gcc/d/d-builtins.cc:

[PATCH] Disable *vsx_reduc__v2df_scalar on little endian (PR target/87064)

2019-01-22 Thread Jakub Jelinek
Hi! The following patch disables *vsx_reduc__v2df_scalar define_insn_and_split for little endian, because it both generates wrong code there (fixable), but also even if fixed, emit much worse code than when it is not present at all. The comment on the pattern says: ;; Combiner patterns with the ve

Re: testsuite dg-directives glitches

2019-01-22 Thread Dominique d'Humières
I have committed the following patch to the gcc-8-branch as r268158 after a regtest. Dominique Index: gcc/testsuite/ChangeLog === --- gcc/testsuite/ChangeLog (revision 268156) +++ gcc/testsuite/ChangeLog (working copy) @@

[PATCH] Provide suggestions for unrecognized -dump options (PR driver/88911)

2019-01-22 Thread David Malcolm
PR driver/88911 reports an issue where the user couldn't remember the spelling of the "-dumpspecs" option, and attempted various similar spellings, but many of them failed to contain a suggestion of the correct spelling: $ gcc q.c -dump-spec cc1: warning: unrecognized gcc debugging option: u

[COMMITTED][testsuite] Fix vect-nop-move.c test (PR87763)

2019-01-22 Thread Wilco Dijkstra
Fix a failing test - changes in Combine mean the test now fails eventhough the generated code is the same. Given there are several AArch64-specific tests for vec-select, remove the scanning of Combine output. Committed as trivial fix. ChangeLog: 2019-01-22 Wilco Dijkstra PR rtl-opti

[wwwdocs] Another addition to gcc-9/porting_to.html

2019-01-22 Thread Jakub Jelinek
Hi! I've committed following addition to porting_to.html to document another user visible change. --- htdocs/gcc-9/porting_to.html11 Jan 2019 18:21:45 - 1.1 +++ htdocs/gcc-9/porting_to.html22 Jan 2019 17:40:12 - @@ -56,6 +56,61 @@ and provide solutions. Let us know if

Re: [arm][RFC] PR target/88469 fix incorrect argument passing with 64-bit bitfields

2019-01-22 Thread Richard Earnshaw (lists)
On 22/01/2019 14:50, Jakub Jelinek wrote: > On Tue, Jan 22, 2019 at 02:10:59PM +, Richard Earnshaw (lists) wrote: >> @@ -6630,6 +6633,13 @@ arm_needs_doubleword_align (machine_mode mode, >> const_tree type) >> Make sure we can warn about that with -Wpsabi. */ >>ret = -1; >>

[testsuite, committed] fix tests requiring -fdelete-null-pointer-checks

2019-01-22 Thread Sandra Loosemore
The nios2-elf target defaults to -fno-delete-null-pointer-checks, at the request of Altera; they wanted to be able to manipulate pointers to memory at address zero. From time to time I find new tests that have an implicit dependence on -fdelete-null-pointer-checks, which I've been fixing for t

[testsuite, committed] require fpic effective target for tests with -fpic

2019-01-22 Thread Sandra Loosemore
On nios2, PIC relocations are defined only for the GNU/Linux ABI, so nios2-elf gives a "sorry" with -fpic. That was causing some failures in some new testcases explicitly passing -fpic or -fPIC in dg-options. I've fixed these tests by adding dg-require-effective-target fpic, which is how I've

Re: [PATCH] Disable *vsx_reduc__v2df_scalar on little endian (PR target/87064)

2019-01-22 Thread Segher Boessenkool
Hi Jakub, On Tue, Jan 22, 2019 at 05:31:58PM +0100, Jakub Jelinek wrote: > The following patch disables *vsx_reduc__v2df_scalar > define_insn_and_split for little endian, because it both generates > wrong code there (fixable), but also even if fixed, emit much worse code > than when it is not pres

[PATCH, rtl-optimization]: Fix PR88948, store-motion pass creates unrecognisable insn

2019-01-22 Thread Uros Bizjak
Hello! RTL store motion pass transforms: (insn 19 18 20 4 (parallel [ (set (mem/c:SI (symbol_ref:SI ("bar_arg") [flags 0x2] ) [1 bar_arg+0 S4 A32]) (fix:SI (reg:DF 89))) (clobber (scratch:XF)) ]) "stdarg-3.c":63:7 156 {fix_truncsi_i387_fisttp}

[PATCH] Simplify sinh (x) / cosh (x)

2019-01-22 Thread Rafael Tsuha
This patch simplifies the expression sinh (x) / cosh (x) to tanh (x). This rule is mathematically valid. There's a slight difference in the result when applying this optimization with x in the interval 0 < x <= 1e-4951. With the optimization, the result using long double is -0 and without the opti

Re: [PATCH,GDC] Add netbsd support to GDC

2019-01-22 Thread Iain Buclaw
On Tue, 22 Jan 2019 at 17:29, Maya Rashish wrote: > > libphobos/libdruntime changes were contributed upstream: > https://github.com/dlang/druntime/pull/2472 > (caveat: pending a change to netbsd/execinfo.d) > > One missing patch is needed for GDC to work. > > gcc/config.gcc (*-*-netbsd*): add netb

[patch, fortran] Move some array packing to front end

2019-01-22 Thread Thomas Koenig
Hello world, the attached patch moves the packing / unpacking of arrays to the front end when optimizing, but not for size. Rationale: internal_pack and internal_unpack are opaque to the compiler. This can lead to a lot of information loss for inlining and inter- procedural optimization, and in

Re: C++ PATCH for c++/78244 - narrowing conversion in template not detected, part 2

2019-01-22 Thread Marek Polacek
On Mon, Jan 21, 2019 at 03:14:53PM -0500, Jason Merrill wrote: > On 1/18/19 9:12 AM, Marek Polacek wrote: > > On Thu, Jan 17, 2019 at 04:17:29PM -0500, Jason Merrill wrote: > > > On 1/17/19 2:09 PM, Marek Polacek wrote: > > > > This patch ought to fix the rest of 78244, a missing narrowing warning

[PR fortran/57553, patch] - bad error message for invalid use of STORAGE_SIZE

2019-01-22 Thread Harald Anlauf
The above PR had a partial fix by Tobias Burnus for a valid use of STORAGE_SIZE, but did not properly handle an error situation. The attached simple fix adds a list of allowed intrinsics for use in specification inquiries in F2008+. Testcase by Tobias. Regtested on x86_64-pc-linux-gnu. OK for t

Re: [PATCH, d] Committed merge with upstream dmd

2019-01-22 Thread Iain Buclaw
On Tue, 22 Jan 2019 at 11:08, Andreas Schwab wrote: > > In file included from ../../gcc/d/d-system.h:23, > from ../../gcc/d/dmd/root/dsystem.h:24, > from ../../gcc/d/dmd/mtype.c:11: > ../../gcc/d/dmd/mtype.c: In member function 'Identifier* > Type::getTypeInfoIde

Re: [PR88579, patch] Calculating power of powers of two

2019-01-22 Thread Thomas Koenig
Hi Harald, here's my revised patch for the treatment of (2**e) ** n and (- 2**e) ** n, trying to take into account the bitwidth of the result. I've also extended the testcase to sample different integer kinds. ChangeLogs see below. Note: I don't have commit rights, so please somebody else tak

Re: [PATCH 9/9] [libbacktrace] Add printdwarftest_dwz_cmp.sh test-case

2019-01-22 Thread Tom de Vries
On 19-01-19 01:54, Ian Lance Taylor wrote: > On Fri, Jan 18, 2019 at 4:45 PM Tom de Vries wrote: >> >> On 18-01-19 15:23, Ian Lance Taylor wrote: >>> On Thu, Jan 17, 2019 at 5:59 AM Tom de Vries wrote: now that the rest of the patch series has been committed, here's an updated vers

[libbacktrace] Use size_t for low_offset/high_offset fields of struct unit

2019-01-22 Thread Tom de Vries
[ was: Re: [PATCH 7/9] [libbacktrace] Handle DW_FORM_GNU_ref_alt ] On 18-01-19 15:25, Ian Lance Taylor wrote: > On Thu, Jan 17, 2019 at 6:14 AM Tom de Vries wrote: >> >> On 17-01-19 01:35, Ian Lance Taylor wrote: >>> On Wed, Jan 16, 2019 at 4:17 PM Tom de Vries wrote: this handles DW_FO

Re: [PR c++/86610] lambda captures in templates

2019-01-22 Thread H.J. Lu
On Wed, Jan 16, 2019 at 2:32 PM Jason Merrill wrote: > > On 1/16/19 4:48 PM, Nathan Sidwell wrote: > > This PR reports a bug where we select a non-const operator function and > > then apply it to a const object. That's happening because the > > expression 'c[0]' is not dependent, so we figure end

[C++ PATCH] Change similarly also loop genericization (PR c/44715)

2019-01-22 Thread Jakub Jelinek
Hi! This patch adjusts genericize_cp_loop similarly to the PR88984 change in genericize_switch_stmt, so that the following testcase now behaves the same in both C and C++, plus adds the testcase and documentation. Bootstrapped/regtested on {x86_64,i686,powerpc64{,le}}-linux, ok for trunk? 2019-0

[C++ PATCH] Fix switch genericization ICE (PR c++/88984)

2019-01-22 Thread Jakub Jelinek
Hi! The following testcase ICEs, because we assert that if during parsing we haven't found any break; stmts in SWITCH_STMT_BODY, the switch statement break label will not be used. It is used in this case though, because while during parsing we expect break stmts only from switch body to go to the

[PATCH] Fix gimple-loop-interchange ICE (PR tree-optimization/88964)

2019-01-22 Thread Jakub Jelinek
Hi! SCEV can analyze not just integral/pointer IVs, but (scalar) float ones as well. Calling build_int_cst on such types results in ICE, build_zero_cst works. Though the loop invariant PHI IVs, if we represent them as using +0.0 step, aren't correct if honoring signed zeros, as + 0.0 will make a

[committed] Fix OpenMP atomic gimplification on bitfield with non-integral representative (PR middle-end/88968)

2019-01-22 Thread Jakub Jelinek
Hi! BIT_INSERT_EXPR is only defined for integral and vector types, so if we have an array type which is bitfield representative if there is no integral type, this fails to gimplify. This still uses BIT_INSERT_EXPR with those types to hold the expressions between c-omp.c and gimplification, but fi

[committed] Fix rs6000_gimple_fold_builtin (PR target/88965)

2019-01-22 Thread Jakub Jelinek
Hi! As mentioned in the PR, gimple_build can return some trees that aren't valid in MEM_REF's operand (in particular, SSA_NAMEs are allowed there, but only a subset of invariants). The following patch forces the address into a SSA_NAME if it fails the MEM_REF operand's predicate. Bootstrapped/re

Re: [EXT] Re: [Patch 2/4][Aarch64] v2: Implement Aarch64 SIMD ABI

2019-01-22 Thread Steve Ellcey
On Mon, 2019-01-21 at 18:00 +, Tamar Christina wrote: > > > That would need to be aarch64*-*-* to include big-endian. Fixing that here > > and in the other tests is OK under the obvious rule. > > Ah, true, I didn't look at the testcase. I tested the ILP32 case and > committed the fix for bot

Re: [libbacktrace] Use size_t for low_offset/high_offset fields of struct unit

2019-01-22 Thread Ian Lance Taylor
On Tue, Jan 22, 2019 at 2:03 PM Tom de Vries wrote: > > [ was: Re: [PATCH 7/9] [libbacktrace] Handle DW_FORM_GNU_ref_alt ] > On 18-01-19 15:25, Ian Lance Taylor wrote: > > On Thu, Jan 17, 2019 at 6:14 AM Tom de Vries wrote: > >> > >> On 17-01-19 01:35, Ian Lance Taylor wrote: > >>> On Wed, Jan 16

Re: [EXT] Re: [Patch 2/4][Aarch64] v2: Implement Aarch64 SIMD ABI

2019-01-22 Thread Tamar Christina
Hi Steve, No we are using aarch64_be-*-* but this is the only one that popped up as a failure which is why I didn't change the others. But now I'm wondering why... I'll check the log file manually tomorrow to be sure. Cheers, Tamar From: Steve Ellcey Se

[PATCH] Fix -fsplit-paths documentation

2019-01-22 Thread Segher Boessenkool
It is enabled at -O3, but the doc currently says -O2. This fixes it. Committing to trunk. Segher 2019-01-22 Segher Boessenkool * doc/invoke.texi (-fsplit-paths): This is enabled by default at -O3. --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] rs6000: Fix PR87604

2019-01-22 Thread Bill Schmidt
A libgomp test demonstrated a problem with reduction code in the Power back end (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87064) for little-endian code. The define_insn_and_split at the heart of the problem depends on big-endian data layout, and should have been disabled when little-endian

Re: Fortran vector math header

2019-01-22 Thread Joseph Myers
On Tue, 22 Jan 2019, Richard Biener wrote: > > Or instead just come up with target specific strings to determine the ABI, > > say i386, x86_64 and x32 for the 3 ABIs on x86, powerpc{,64}{,le} on rs6000 > > etc. > > Yeah, I would even suggest to use a target hook multilib_ABI_active_p > (const cha

[PATCH] avoid assuming arrays have nonzero size (PR 88956)

2019-01-22 Thread Martin Sebor
The enhancement to treat char initializer-lists as STRING_CSTs committed earlier last year introduced an assumption that array elements have a non-zero size. As it turns out, the zero-length array extension that makes it possible to define even multi- dimensional zero-length array objects breaks

Re: [PATCH] avoid assuming arrays have nonzero size (PR 88956)

2019-01-22 Thread Joseph Myers
On Tue, 22 Jan 2019, Martin Sebor wrote: > PS In GCC 10, unless there is an important use case that escapes > me, I think GCC should warn for zero-length non-member array > objects, or perhaps even for internal struct members (those followed > by another member). Not to avoid these sorts of bugs

Re: [PATCH] x86-64: Use TI->SF and TI->DF conversions in soft-fp

2019-01-22 Thread H.J. Lu
On Mon, Jan 21, 2019 at 6:03 PM Joseph Myers wrote: > > On Mon, 21 Jan 2019, H.J. Lu wrote: > > > The testcase at > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88931 > > > > with -frounding-math. __floattisf and __floattidf from libgcc2.c give > > the wrong results for FE_UPWARD and FE_TOW