[PATCH] Fix PR88739

2019-01-28 Thread Richard Biener
This restricts BIT_FIELD_REFs we create to ones operating on mode-precision entities (iff INTEGRAL_TYPE_P). This avoids issues with endianess when expanding them. No testcase, BE folks have to come up with sth suitable for the testsuite. Bootstrapped and tested on x86_64-unknown-linux-gnu, app

Re: [PATCH] Fix PR87295

2019-01-28 Thread Richard Biener
On Sat, 26 Jan 2019, Jason Merrill wrote: > On Fri, Jan 25, 2019 at 7:57 AM Richard Biener wrote: > > > > The following fixes an ICE with -flto -ffat-lto-objects > > -fdebug-types-section -g where optimize_external_refs does not > > expect to see DW_AT_signature as made "local" by build_abbrev_ta

[PATCH] Fix PR89064

2019-01-28 Thread Richard Biener
XFAILed on trunk as well. Somehow I missed this. Richard. 2019-01-28 Richard Biener PR testsuite/89064 PR tree-optimization/86865 * testsuite/libgomp.graphite/force-parallel-5.c: XFAIL. Index: libgomp/testsuite/libgomp.graphite/force-parallel-5.c ==

[libbacktrace] Fix and simplify xcoff_%.c pattern rule

2019-01-28 Thread Tom de Vries
[ was: Re: [backtrace] Avoid segfault ] On 27-01-19 22:53, Ian Lance Taylor wrote: > On Sun, Jan 27, 2019 at 1:16 PM Tom de Vries wrote: >> >> On 25-01-19 18:15, Nathan Sidwell wrote: >>> On 1/25/19 5:28 AM, Tom de Vries wrote: This patch fixes it by passing "" instead of NULL, in the c

[PATCH] Fix PR89076

2019-01-28 Thread Richard Biener
Committed as obvious. Richard. 2019-01-28 Richard Biener PR debug/89076 * dwarf2out.c (gen_subprogram_die): Remove leftover from MPX support removal. Index: gcc/dwarf2out.c === --- gcc/dwarf2out.c (

Re: C++ PATCH for c++/89024 - ICE with incomplete enum type

2019-01-28 Thread Christophe Lyon
On Sun, 27 Jan 2019 at 01:25, Jason Merrill wrote: > > On Fri, Jan 25, 2019 at 6:22 PM Marek Polacek wrote: > > > > On Fri, Jan 25, 2019 at 12:14:07PM -0500, Jason Merrill wrote: > > > On 1/25/19 12:09 PM, Marek Polacek wrote: > > > > On Fri, Jan 25, 2019 at 10:55:55AM -0600, Tim Song wrote: > >

[PATCH] Add various missing x86 ISA options to doc/{invoke,extend}.texi (PR target/89073)

2019-01-28 Thread Jakub Jelinek
Hi! The documentation has several lists of x86 ISA options and various options were missing from them. The PR was mainly about missing options in x86 target attribute section, which missed a lot of the options, but for each of the missing ones I've also double checked invoke.texi - some options w

Re: [PATCH PR88932]Fix ICE by sorting chain refs in Dom order

2019-01-28 Thread Richard Biener
On Mon, Jan 28, 2019 at 2:39 AM bin.cheng wrote: > > Hi, > This simple patch fixes the ICE by getting loop bbs in dominance order and > sorting > chain references against it. Previously it didn't take dominance in > consideration for > loop thus resulted in use-before-def issue. > After looking

Re: [PATCH] Add various missing x86 ISA options to doc/{invoke,extend}.texi (PR target/89073)

2019-01-28 Thread Richard Biener
On Mon, Jan 28, 2019 at 10:48 AM Jakub Jelinek wrote: > > Hi! > > The documentation has several lists of x86 ISA options and various options > were missing from them. The PR was mainly about missing options in x86 > target attribute section, which missed a lot of the options, but for each > of th

[libbacktrace] Add gen-xcoff-n.sh

2019-01-28 Thread Tom de Vries
[ was: Re: [libbacktrace] Fix and simplify xcoff_%.c pattern rule ] On 28-01-19 10:25, Tom de Vries wrote: > [ was: Re: [backtrace] Avoid segfault ] > On 27-01-19 22:53, Ian Lance Taylor wrote: >> On Sun, Jan 27, 2019 at 1:16 PM Tom de Vries wrote: >>> >>> On 25-01-19 18:15, Nathan Sidwell wrote

Re: [PATCH] Fix PR87295

2019-01-28 Thread Richard Biener
On Mon, 28 Jan 2019, Richard Biener wrote: > On Sat, 26 Jan 2019, Jason Merrill wrote: > > > On Fri, Jan 25, 2019 at 7:57 AM Richard Biener wrote: > > > > > > The following fixes an ICE with -flto -ffat-lto-objects > > > -fdebug-types-section -g where optimize_external_refs does not > > > expect

Re: [PATCH] Wrap 'expand_all_functions' and 'ipa_passes' around timevars

2019-01-28 Thread Richard Biener
On Thu, Jan 24, 2019 at 8:51 PM Giuliano Belinassi wrote: > > This patch adds two variables named 'TV_CGRAPH_FUNC_EXPANSION' and > 'TV_CGRAPH_IPA_PASSES' that count the elapsed time of the functions > 'expand_all_functions' and 'ipa_passes', respectivelly. > > The main point of this is that these

Re: incorrect parsing of -fopt-info

2019-01-28 Thread Richard Biener
On Mon, Jan 21, 2019 at 12:31 PM Ulrich Drepper wrote: > > There is a problem with parsing the second part of the -fopt-info > command line parameter in case there is an equal sign followed by a > filename with a dash: > > $ g++ -c -O -fopt-info-all=some-file u.cc > cc1plus: warning: unknown optio

[PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Jakub Jelinek
Hi! While thinking about PR59813, I came up with following testcase. Is that valid C++? What I want to highlight here that we need to treat the clobbers created for C++ destructors differently from clobbers added for when variables go out of scope. Right now we end up with: char buf2[128]; ch

Re: [PATCH] Add target-zlib to top-level configure, use zlib from libphobos

2019-01-28 Thread Richard Biener
On Mon, Jan 21, 2019 at 7:35 PM Iain Buclaw wrote: > > Hi, > > Following on from the last, this adds target-zlib to target_libraries > and updates libphobos build scripts to link to libz_convenience.a. > The D front-end already has target-zlib in d/config-lang.in. > > Is the top-level part OK? I

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Richard Biener
On Mon, 28 Jan 2019, Jakub Jelinek wrote: > Hi! > > While thinking about PR59813, I came up with following testcase. > Is that valid C++? > > What I want to highlight here that we need to treat the clobbers created > for C++ destructors differently from clobbers added for when variables go > out

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Jakub Jelinek
On Mon, Jan 28, 2019 at 01:18:43PM +0100, Richard Biener wrote: > Eww :/ That means they are not semantically the same which IMHO is > bad. If you make buf1 volatile does it trip over > maybe_canonicalize_mem_ref_addr and miscompile? Or are we somehow If buf1 is volatile, then no clobbers are a

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Richard Biener
On Mon, 28 Jan 2019, Jakub Jelinek wrote: > On Mon, Jan 28, 2019 at 01:18:43PM +0100, Richard Biener wrote: > > Eww :/ That means they are not semantically the same which IMHO is > > bad. If you make buf1 volatile does it trip over > > maybe_canonicalize_mem_ref_addr and miscompile? Or are we s

Re: [PATCH] Wrap 'expand_all_functions' and 'ipa_passes' around timevars

2019-01-28 Thread Giuliano Belinassi
On 01/28, Richard Biener wrote: > On Thu, Jan 24, 2019 at 8:51 PM Giuliano Belinassi > wrote: > > > > This patch adds two variables named 'TV_CGRAPH_FUNC_EXPANSION' and > > 'TV_CGRAPH_IPA_PASSES' that count the elapsed time of the functions > > 'expand_all_functions' and 'ipa_passes', respectivell

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Jakub Jelinek
On Mon, Jan 28, 2019 at 01:55:38PM +0100, Richard Biener wrote: > So I guess in the end we're being lucky. Somehow. I've played with > > __attribute__((noipa)) void > qux () > { > S buf1; > foo ((char *)&buf1); > S *p = new (&buf1) (S); > bar (p); > p->~S (); > { > char buf2[128]

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Jonathan Wakely
On 28/01/19 14:29 +0100, Jakub Jelinek wrote: On Mon, Jan 28, 2019 at 01:55:38PM +0100, Richard Biener wrote: So I guess in the end we're being lucky. Somehow. I've played with __attribute__((noipa)) void qux () { S buf1; foo ((char *)&buf1); S *p = new (&buf1) (S); bar (p); p->~S (

Re: testsuite dg-directives glitches

2019-01-28 Thread Manfred Schwarb
Am 26.01.2019 um 16:14 schrieb Dominique d'Humières: > I have committed the following patch to the gcc-7-branch as r268294 after a > regtest. > Manfred, could you please check with your script that I did not miss > some test in the gcc-7 and gcc-8 branches? In the GCC-7 branch, there is ./pr6831

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Jason Merrill
On Mon, Jan 28, 2019 at 8:52 AM Jonathan Wakely wrote: > > On 28/01/19 14:29 +0100, Jakub Jelinek wrote: > >On Mon, Jan 28, 2019 at 01:55:38PM +0100, Richard Biener wrote: > >> So I guess in the end we're being lucky. Somehow. I've played with > >> > >> __attribute__((noipa)) void > >> qux () >

Re: [PATCH] Wrap 'expand_all_functions' and 'ipa_passes' around timevars

2019-01-28 Thread Richard Biener
On Mon, Jan 28, 2019 at 2:16 PM Giuliano Belinassi wrote: > > On 01/28, Richard Biener wrote: > > On Thu, Jan 24, 2019 at 8:51 PM Giuliano Belinassi > > wrote: > > > > > > This patch adds two variables named 'TV_CGRAPH_FUNC_EXPANSION' and > > > 'TV_CGRAPH_IPA_PASSES' that count the elapsed time o

Re: [PATCH] Add testcase for C++ placement new and the important difference between dtor clobbers and end of scope clobbers

2019-01-28 Thread Michael Matz
Hi, On Mon, 28 Jan 2019, Richard Biener wrote: > > - MEM[(struct &)&buf1] ={v} {CLOBBER}; > > + buf1 ={v} {CLOBBER}; > > Eww :/ That means they are not semantically the same which IMHO is > bad. But they really are different. One is saying "these bytes contain nothing anymore", the other

Re: C++ PATCH for c++/89024 - ICE with incomplete enum type

2019-01-28 Thread Marek Polacek
On Mon, Jan 28, 2019 at 10:37:01AM +0100, Christophe Lyon wrote: > On Sun, 27 Jan 2019 at 01:25, Jason Merrill wrote: > > > > On Fri, Jan 25, 2019 at 6:22 PM Marek Polacek wrote: > > > > > > On Fri, Jan 25, 2019 at 12:14:07PM -0500, Jason Merrill wrote: > > > > On 1/25/19 12:09 PM, Marek Polacek

Re: PING [PATCH] tighten up -Wbuiltin-declaration-mismatch (PR 86125, 88886, 86308)

2019-01-28 Thread Martin Sebor
On 1/25/19 6:25 PM, Joseph Myers wrote: It's also broken the build of the glibc testsuite, e.g.: ../time/time.h:88:15: error: mismatch in argument 1 type of built-in function 'strftime'; expected 'char *' [-Werror=builtin-declaration-mismatch] 88 | extern size_t strftime (char *__restrict _

Re: PING [PATCH] tighten up -Wbuiltin-declaration-mismatch (PR 86125, 88886, 86308)

2019-01-28 Thread Joseph Myers
On Mon, 28 Jan 2019, Martin Sebor wrote: > On 1/25/19 6:25 PM, Joseph Myers wrote: > > It's also broken the build of the glibc testsuite, e.g.: > > > > ../time/time.h:88:15: error: mismatch in argument 1 type of built-in > > function 'strftime'; expected 'char *' > > [-Werror=builtin-declaration-

Re: C++ PATCH for c++/89024 - ICE with incomplete enum type

2019-01-28 Thread Jason Merrill
On Mon, Jan 28, 2019 at 10:40 AM Marek Polacek wrote: > On Mon, Jan 28, 2019 at 10:37:01AM +0100, Christophe Lyon wrote: > > On Sun, 27 Jan 2019 at 01:25, Jason Merrill wrote: > > > > > > On Fri, Jan 25, 2019 at 6:22 PM Marek Polacek wrote: > > > > > > > > On Fri, Jan 25, 2019 at 12:14:07PM -050

Re: PING [PATCH] tighten up -Wbuiltin-declaration-mismatch (PR 86125, 88886, 86308)

2019-01-28 Thread Martin Sebor
On 1/28/19 9:43 AM, Joseph Myers wrote: On Mon, 28 Jan 2019, Martin Sebor wrote: On 1/25/19 6:25 PM, Joseph Myers wrote: It's also broken the build of the glibc testsuite, e.g.: ../time/time.h:88:15: error: mismatch in argument 1 type of built-in function 'strftime'; expected 'char *' [-Werro

Re: [PATCH, OpenACC] Rework computation of default OpenACC mapping clauses

2019-01-28 Thread Thomas Schwinge
Hi Gergő! On Fri, 25 Jan 2019 15:09:49 +0100, Gergö Barany wrote: > This patch unifies and simplifies the handling of OpenACC default > mapping clauses for parallel, serial, and kernels regions. Thanks. This answers/resolves at least some of the questions that I asked (not you) many months ag

Re: [PATCH] Fix PR87295

2019-01-28 Thread Jason Merrill
On 1/28/19 6:30 AM, Richard Biener wrote: On Mon, 28 Jan 2019, Richard Biener wrote: On Sat, 26 Jan 2019, Jason Merrill wrote: On Fri, Jan 25, 2019 at 7:57 AM Richard Biener wrote: The following fixes an ICE with -flto -ffat-lto-objects -fdebug-types-section -g where optimize_external_refs

PING ^1: V3 [PATCH] i386: Add pass_remove_partial_avx_dependency

2019-01-28 Thread H.J. Lu
On Tue, Jan 22, 2019 at 5:28 AM H.J. Lu wrote: > > 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

Re: C++ PATCH for c++/89024 - ICE with incomplete enum type

2019-01-28 Thread Marek Polacek
On Mon, Jan 28, 2019 at 11:55:21AM -0500, Jason Merrill wrote: > > > The new test fails on arm-eabi (with newlib, but passes on on arm*linux*): > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++14 (test for excess errors) > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++17 (test for excess errors) > > > > > > T

[PATCH, rs6000] Fix invalid type returned from builtin vec_extract

2019-01-28 Thread Kelvin Nilsen
An error in the type returned from the built-in vec_extract function was recently reported, as represented in the following sample program: #include #include int main() { unsigned char uc = 0xf6; printf("explicit cast: %x\n", (int)uc); vector unsigned char v = vec_splats((unsigned

Re: [libbacktrace] Fix and simplify xcoff_%.c pattern rule

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 1:25 AM Tom de Vries wrote: > > [ was: Re: [backtrace] Avoid segfault ] > On 27-01-19 22:53, Ian Lance Taylor wrote: > > On Sun, Jan 27, 2019 at 1:16 PM Tom de Vries wrote: > >> > >> On 25-01-19 18:15, Nathan Sidwell wrote: > >>> On 1/25/19 5:28 AM, Tom de Vries wrote: >

Re: [PATCH, rs6000] Fix invalid type returned from builtin vec_extract

2019-01-28 Thread Segher Boessenkool
Hi Kelvin, On Mon, Jan 28, 2019 at 12:11:34PM -0600, Kelvin Nilsen wrote: > An error in the type returned from the built-in vec_extract function was > recently reported, as represented in the following sample program: [ snip ] > The fix is to coerce the result of vec_extract so that it matches

Re: [wwwdocs] List -Wabsolute-value in gcc-9/changes.html

2019-01-28 Thread Martin Sebor
On 1/26/19 3:37 PM, Martin Jambor wrote: Hi, On Sat, Jan 26 2019, Gerald Pfeifer wrote: On Sat, 26 Jan 2019, Martin Jambor wrote: I'd like to propose the following hunk mentioning -Wabsolute-value in changes.html of the upcoming gcc 9. Is it OK? Lovely^WThanks, ok! Actually, one question:

Re: [wwwdocs] List -Wabsolute-value in gcc-9/changes.html

2019-01-28 Thread Gerald Pfeifer
Hi Martin, On Sat, 26 Jan 2019, Martin Jambor wrote: >> What is a "wrong absolute value function"? That might be good to >> show by means of an example? (Also in invoke.texi, which I checked >> before writing this.) > I'm not sure how to change the wording, perhaps "...when a used absolute > val

[patch, fortran] Fix PR 57048

2019-01-28 Thread Thomas König
Hello world, let the regression hunt continue! the attached patch fixes a long-time regression where a c_funptr from a module could not be found. The solution is a bit of a hack, but so is our whole implementation of the C interop stuff. Regression-tested. OK for trunk? Regards Thoma

Re: [PATCH, OpenACC] Rework OpenACC Fortran DO loop initialization

2019-01-28 Thread Thomas Schwinge
Hi Gergő! (We're asked for to CC the GCC Fortran developers, , for any Fortran related changes.) On Fri, 25 Jan 2019 15:13:48 +0100, Gergö Barany wrote: > This patch moves OpenACC Fortan DO loop setup code from the head of a > region to just before each loop. The code that you're modifying: "

Re: [PATCH, OpenACC] Remove spurious OpenACC error on combining "auto" with gang/worker/vector

2019-01-28 Thread Thomas Schwinge
Hi Gergő! On Fri, 25 Jan 2019 15:18:56 +0100, Gergö Barany wrote: > On OpenACC loop constructs, it is OK according to the OpenACC spec to > have both the "auto" clause and one or more of the "gang", "worker", or > "vector" clauses. GCC emits errors for this combination; this patch > eliminates

C++ PATCH for c++/88358 - name wrongly treated as type

2019-01-28 Thread Marek Polacek
This is a further fix for P0634. When we have template int foo(T::bar); we shouldn't assume that T::bar is a type because this isn't one of the contexts specified by P0634 -- for that, the function name would have to be qualified. So this patch refines my earlier fix. I should've realized

Re: [PATCH v3 09/10] Ignore LLVM's blank lines.

2019-01-28 Thread H.J. Lu
On Wed, Dec 12, 2018 at 3:55 AM Andrew Stubbs wrote: > > > [Already approved by Jeff Law. Included here for completeness.] > > The GCN toolchain must use the LLVM assembler and linker because there's no > binutils port. The LLVM tools do not have the same diagnostic style as > binutils, so the "b

[og8] Add user-friendly diagnostics for OpenACC loop parallelism assigned

2019-01-28 Thread Thomas Schwinge
Hi! On Fri, 14 Dec 2018 22:03:26 +0100, I wrote: > On Thu, 26 Jul 2018 07:14:21 -0700, Cesar Philippidis > wrote: > > [...] > > I further changed that to make it build ;-) at all, and also emit > diagnostics for OpenACC kernels constructs, and also added considerably > more testsuite coverage.

Re: C++ PATCH for c++/89024 - ICE with incomplete enum type

2019-01-28 Thread Jason Merrill
On 1/28/19 12:29 PM, Marek Polacek wrote: On Mon, Jan 28, 2019 at 11:55:21AM -0500, Jason Merrill wrote: The new test fails on arm-eabi (with newlib, but passes on on arm*linux*): FAIL: g++.dg/cpp0x/enum37.C -std=c++14 (test for excess errors) FAIL: g++.dg/cpp0x/enum37.C -std=c++17 (test for e

Re: C++ PATCH for c++/88358 - name wrongly treated as type

2019-01-28 Thread Jason Merrill
On 1/28/19 3:35 PM, Marek Polacek wrote: This is a further fix for P0634. When we have template int foo(T::bar); we shouldn't assume that T::bar is a type because this isn't one of the contexts specified by P0634 -- for that, the function name would have to be qualified. So this patch

Re: [PATCH, gotools]: Really regenerate Makefile.in

2019-01-28 Thread Ian Lance Taylor
On Sun, Jan 27, 2019 at 11:50 PM Uros Bizjak wrote: > > Recent commit increased GOTOOLS_TEST_TIMEOUT in Makefile.am, but > forgot to update Makefile.in. Fix the omission. > > 2019-01-28 Uroš Bizjak > > * Makefile.in: Really regenerate. > > Tested on x86_64-linux-gnu. Whoops, thanks. Ian

Re: [libbacktrace] Add gen-xcoff-n.sh

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 2:24 AM Tom de Vries wrote: > > [ was: Re: [libbacktrace] Fix and simplify xcoff_%.c pattern rule ] > > On 28-01-19 10:25, Tom de Vries wrote: > > [ was: Re: [backtrace] Avoid segfault ] > > On 27-01-19 22:53, Ian Lance Taylor wrote: > >> On Sun, Jan 27, 2019 at 1:16 PM To

[C PATCH] Fix another compound literal ICE (PR c/89045)

2019-01-28 Thread Jakub Jelinek
Hi! In this case, when a compound literal is in the parameter scope of a nested function, current_function_decl is non-NULL, but we still don't want to pushdecl it, as the code doesn't expect any VAR_DECLs etc. in parameter scope. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linu

Go patch committed: Avoid compiler crash in recursive type detection

2019-01-28 Thread Ian Lance Taylor
This patch by Ben Shi fixes the Go frontend to avoid crashing when handling a recursive type definition like type T0 T1; type T1 T2; .. type Tn T0 This fixes https://golang.org/issue/25320. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/g

[committed] Fix lastprivate gimplification in taskloop (PR middle-end/89002)

2019-01-28 Thread Jakub Jelinek
Hi! When gimplifying lastprivate or linear clause with non-NULL OMP_CLAUSE_*_STMT, we wrap it into a BIND_EXPR and push temporaries there, but I haven't done that when we are adding that only during gimplification for the loop's IV. For worksharing loop or distribute or simd it isn't that big dea

[libbacktrace] Don't assign check_PROGRAMS to TESTS

2019-01-28 Thread Tom de Vries
[ was: Re: [backtrace] Avoid segfault ] On 27-01-19 22:16, Tom de Vries wrote: > +# The file b2test_buildid is an objcopy of b2test, so these programs share > the > +# same build-id. The first time b2test is run, there's no corresponding > debug > +# file at ./usr/lib/debug/.build-id/aa/bb..zz.

Re: [C PATCH] Fix PR86125 fallout

2019-01-28 Thread Joseph Myers
On Sat, 26 Jan 2019, Jakub Jelinek wrote: > Hi! > > Here is an untested patch that should fix all of that, ok for trunk > if it passes bootstrap/regtest on {x86_64,i686}-linux? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Add target-zlib to top-level configure, use zlib from libphobos

2019-01-28 Thread Joseph Myers
On Mon, 28 Jan 2019, Richard Biener wrote: > On Mon, Jan 21, 2019 at 7:35 PM Iain Buclaw wrote: > > > > Hi, > > > > Following on from the last, this adds target-zlib to target_libraries > > and updates libphobos build scripts to link to libz_convenience.a. > > The D front-end already has target-z

Re: [C PATCH] Fix another compound literal ICE (PR c/89045)

2019-01-28 Thread Joseph Myers
On Mon, 28 Jan 2019, Jakub Jelinek wrote: > Hi! > > In this case, when a compound literal is in the parameter scope of a nested > function, current_function_decl is non-NULL, but we still don't want to > pushdecl it, as the code doesn't expect any VAR_DECLs etc. in parameter > scope. > > Fixed t

Re: [PATCH] [ARC] atomics: Add operand to DMB instruction

2019-01-28 Thread Vineet Gupta
On 1/20/19 8:19 AM, Claudiu Zissulescu wrote: > Hi, >> 2019-01-18 Vineet Gupta >> >>* config/arc/atomic.md: Add operand to DMB instruction >> > This is ok. I'll push it asap, > Claudiu Thx, I see it merged into mainline. Can you please backport this to gcc-8-branch as well ? Thx, -Vinee

[PATCH] PR libstdc++/68737 Do not use vsnprintf on HPUX

2019-01-28 Thread Jonathan Wakely
It doesn't conform to the spec, so use vsprintf with a large buffer instead. PR libstdc++/68737 * config/locale/generic/c_locale.h (__convert_from_v) [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF. * config/os/hpux/os_defines.h: Define _GLIBCXX

Re: [Patch] PR rtl-optimization/87763 - generate more bfi instructions on aarch64

2019-01-28 Thread Steve Ellcey
On Sat, 2019-01-26 at 00:00 +0100, Jakub Jelinek wrote: > > > + /* Verify that there is no overlap in what bits are set in the two > > masks. */ > > + if ((m1 + m2 + 1) != 0) > > +return false; > > Wouldn't that be clearer to test > if (m1 + m2 != HOST_WIDE_INT_1U) > return false; >

Re: [Patch] PR rtl-optimization/87763 - generate more bfi instructions on aarch64

2019-01-28 Thread Jakub Jelinek
On Tue, Jan 29, 2019 at 12:11:46AM +, Steve Ellcey wrote: > > As mentioned in rs6000.md, I believe you also need a similar pattern where > > the two ANDs are swapped, because they have the same priority. > > I fixed the long lines in aarch64.md and I added a second pattern for > the *aarch64_b

[PATCH] Ensure pool resources always use normal mode vector

2019-01-28 Thread Jonathan Wakely
The __pool_resource::_M_unpooled member was declared with type std::vector, which means that the type depends on whether debug mode is active or not. Because the non-inline definitions in src/c++17/memory_resource.cc are never compiled with debug mode, the type declared in the header doesn't match

[PATCH] Fix tests that fail in C++2a mode

2019-01-28 Thread Jonathan Wakely
The nested typedefs in std::reference_wrapper are no longer present in C++2a mode, so skip the tests that check for them. The addition of the [[nodiscard]] attribute to a few functions causes some failures in tests that intentionally ignore the return value. Casting the result to void suppresses

[PATCH] Avoid ambiguity between C++2a std::erase_if and LFTS version

2019-01-28 Thread Jonathan Wakely
These calls should have been qualified to avoid ADL anyway, but in C++2a it becomes essential to qualify the calls in experimental::erase because std::erase_if is also declared and the calls become ambiguous. * include/experimental/forward_list (experimental::erase): Qualify call

[PATCH] Add missing exports for symbols used by directory iterators

2019-01-28 Thread Jonathan Wakely
* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for __shared_ptr instantiations used by gcc4-compatible ABI. Tested x86_64-linux, committed to trunk. commit b50b2bf26eef0e87014c19991bebfa9b75c2b754 Author: Jonathan Wakely Date: Tue Jan 29 00:19:59 2019 +

libgo patch committed: Use the call instruction's PC for panic-in-runtime checks

2019-01-28 Thread Ian Lance Taylor
This patch by Cherry Zhang changes libgo to use the call instruction's PC for panic-in-runtime detection. If a panic happens in the runtime we turn that into a fatal error. We use the caller's PC to determine if the panic call is inside the runtime. getcallerpc returns the PC immediately after th

Re: [libbacktrace] Don't assign check_PROGRAMS to TESTS

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 3:05 PM Tom de Vries wrote: > > [ was: Re: [backtrace] Avoid segfault ] > > On 27-01-19 22:16, Tom de Vries wrote: > > +# The file b2test_buildid is an objcopy of b2test, so these programs share > > the > > +# same build-id. The first time b2test is run, there's no corres

[PATCH] [ARC]: Enable init_array support

2019-01-28 Thread Vineet Gupta
gcc's common configure script has a subtle flaw that it only tests {init,fini.preinit}_array support when NOT cross compiling. This causes cross builds to erroneously deduce that the feature is not supported by the target. | host-gcc-final-ab544139bfee/build/gcc/config.log | |configure:22941: chec

Re: [Driver] Add support for -fuse-ld=lld

2019-01-28 Thread Alan Modra
On Sat, Jan 26, 2019 at 04:34:59PM -0600, Segher Boessenkool wrote: > On Thu, Jun 23, 2016 at 09:01:30PM -0700, Davide Italiano wrote: > > LLVM currently ships with a new ELF linker http://lld.llvm.org/. > > I experiment a lot with gcc and lld so it would be nice if > > -fuse-ld=lld is supported (c

[PATCH] Fix tests for complex overloads of std::arg and std::proj

2019-01-28 Thread Jonathan Wakely
The test for the synopsis of incorrectly adds constexpr to two functions in C++2a mode, but the C++2a draft and the header do not declare them constexpr. * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect constexpr specifiers from arg and proj. Tested x86_64-

C++ PATCH for c++/88325 - ICE with invalid out-of-line template member definition

2019-01-28 Thread Marek Polacek
This patch fixes an ICE-on-invalid (becase out-of-line constructors can't have template arguments and also because function templates can't be partially specialized) in C++2a: when we're parsing template template A::A () in the attached test we end up parsing "A::A" as a type name, and first we

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

2019-01-28 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01340.html This is a straightforward fix for an ICE. I will commit it tomorrow unless there are suggestions for other changes. On 1/22/19 6:18 PM, Martin Sebor wrote: The enhancement to treat char initializer-lists as STRING_CSTs committed ea

Re: [C++ PATCH] [PR87770] test partial specializations for type dependence

2019-01-28 Thread Alexandre Oliva
On Jan 27, 2019, Jason Merrill wrote: >> +tinfo = DECL_TEMPLATE_INFO (node); > Maybe use get_template_info? Neat! But then, if we can assume node is a decl, we might as well go straight for DECL_TEMPLATE_INFO. I'd rather not make that assumption, though, and allow this new function to be