Re: introduce --enable-mingw-full32 to default to --large-address-aware

2018-10-11 Thread Alexandre Oliva
On Oct 11, 2018, JonY <10wa...@gmail.com> wrote: > On 10/11/2018 02:57 AM, NightStrike wrote: >> >> Except that options typically don't get removed, just deprecated. It >> seems cleaner to me to drop mingw from the name and make it default to >> enabled for cygwin. > It is already enabled for

Re: [C++ PATCH] Fix pretty-print of enumerator ids (PR c++/87364)

2018-10-11 Thread Christophe Lyon
On Fri, 12 Oct 2018 at 05:37, Jeff Law wrote: > > On 10/8/18 11:12 AM, will wray wrote: > > Hi, > > > > A PR to fix Bug 87364 - Pretty print of enumerator never prints the id, > > always falls back to C-style cast output > > > > The fix is tested with the code attached to the bug report and

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Eric Gallager
On 10/10/18, Martin Sebor wrote: > While writing tests for fixes and enhancements for attribute > handling I keep finding myself coming up with the same boiler- > plate code to verify whether an attribute has or has not been > successfully applied. It's often error-prone because it > depends on

Re: [doc PATCH] attribute packed does not apply to variables

2018-10-11 Thread Eric Gallager
On 10/11/18, Martin Sebor wrote: > The manual says that: > >The packed attribute specifies that a variable or structure >field should have the smallest possible alignment--one byte >for a variable, and one bit for a field... > > The variable part doesn't actually reflect reality: GCC

Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules

2018-10-11 Thread Jeff Law
On 8/7/18 2:00 PM, Giuliano Augusto Faulin Belinassi wrote: > Related with bug 86829, but for hyperbolic trigonometric functions. > This patch adds substitution rules to both sinh(tanh(x)) -> x / sqrt(1 > - x*x) and cosh(tanh(x)) -> 1 / sqrt(1 - x*x). Notice that the both > formulas has division

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Jeff Law
On 10/11/18 1:23 PM, Peter Bergner wrote: > On 10/11/18 1:18 PM, Peter Bergner wrote: >> Ok, after working in gdb, I see that the PA-RISC port still uses reload >> and not LRA, but it too seems to have the same issue of reusing input >> regs that have REG_DEAD notes, so the question still stands.

Re: [C++ PATCH] Fix pretty-print of enumerator ids (PR c++/87364)

2018-10-11 Thread Jeff Law
On 10/8/18 11:12 AM, will wray wrote: > Hi, > > A PR to fix Bug 87364 - Pretty print of enumerator never prints the id, > always falls back to C-style cast output > > The fix is tested with the code attached to the bug report and additional > usage over the past few weeks. > > Bootstrap and

Re: [PATCH][GCC][testsuite] Fix caching of tests for multiple variant runs and update existing target-supports tests.

2018-10-11 Thread Jeff Law
On 9/27/18 8:13 AM, Tamar Christina wrote: >>> The error you would get if you do this is very confusing so I thought >>> since it didn't matter much for the regexp only target triple tests >>> that just accepting this would be fine. >> Seems a good thing that that's a noisy failure; the function

Re: [doc PATCH] attribute packed does not apply to variables

2018-10-11 Thread Jeff Law
On 10/11/18 9:03 PM, Martin Sebor wrote: > The manual says that: > >   The packed attribute specifies that a variable or structure >   field should have the smallest possible alignment--one byte >   for a variable, and one bit for a field... > > The variable part doesn't actually reflect 

[doc PATCH] attribute packed does not apply to variables

2018-10-11 Thread Martin Sebor
The manual says that: The packed attribute specifies that a variable or structure field should have the smallest possible alignment--one byte for a variable, and one bit for a field... The variable part doesn't actually reflect reality: GCC and all other compilers I tested ignore the

Re: [doc PATCH] mention interaction with noinline in flatten

2018-10-11 Thread Jeff Law
On 10/11/18 2:58 PM, Martin Sebor wrote: > While writing tests for attribute flatten I wasn't 100% sure > from reading the manual if it would respect attribute noinline > or if it would override it.  Turns out it's the former so > the attached patch mentions it in the manual.  Unless there > are 

Re: [PATCH, doc] describe mode checking for doloop_end pattern

2018-10-11 Thread Jeff Law
On 10/11/18 3:09 PM, Paul Koning wrote: > Updated with an additional item I just debugged. > > Since the code that uses the doloop_end pattern does not check the operand > mode as given in the pattern, the pattern itself may need to do this, and > that was not documented. In addition, if the

Re: [PATCH] Simplify comparison of attrs in IPA ICF.

2018-10-11 Thread Jeff Law
On 10/11/18 5:48 AM, Martin Liška wrote: > Hi. > > This is simplification in ICF where we can use attribute comparison > function from attrs.c instead of implementing our own. > > Patch survives tests on x86_64-linux-gnu. > Ready for trunk? > Thanks, > Martin > > gcc/ChangeLog: > > 2018-10-10

Re: [PATCH] Fix pr87156 ICE building libstdc++ for mips64

2018-10-11 Thread Jeff Law
On 10/11/18 4:12 AM, Paul Hua wrote: > Hi: > > The bug pr87156 make MIPS target bootstrap fail a month ago. The > attached patch that posted under bugzilla by Jan Hubicka fixed the > bug. > Bootstrapped and reg-tested on mips64el-linux-gnu and x86_64-pc-linux-gnu. > Considering that Jan not very

Re: [doc PATCH] using multiple format-arg attributes on a single function (PR 87593)

2018-10-11 Thread Martin Sebor
On 10/11/2018 04:38 PM, Joseph Myers wrote: On Thu, 11 Oct 2018, Martin Sebor wrote: Attached is a documentation-only patch to clarify the use case of multiple distinct format_arg attributes on a single function. It's far from obvious that the use case makes sense so explicitly mentioning it

C++ PATCH for decomp31.C test

2018-10-11 Thread Marek Polacek
Running make check-c++ RUNTESTFLAGS=dg.exp=decomp31.C will yield # of unsupported tests 3 because the test (as the only one in cpp1z/) uses "dg-do compile { target c++17 }" which doesn't work (yet?). This patch makes it use explicit dg-options as in other tests, so now we get # of

C++ PATCH to add test to cover case RANGE_FOR_STMT

2018-10-11 Thread Marek Polacek
Recently it came up that no test in the testsuite triggers the RANGE_FOR_STMT case in potential_constant_expression_1. I came up with this valid test that tickles that codepath. I can't use ({ }) instead of a lambda because the constexpr machinery doesn't handle statement expressions; see

C++ PATCH for c++/87594, constexpr rejects-valid with range-based for

2018-10-11 Thread Marek Polacek
Here potential_constant_expression_1 rejects the testcase because the body of the for loop calls a non-constexpr function. But the range is empty so the function would never get called. The trick with evaluating the for-condition doesn't work here, because we're dealing with a converted

Re: C++ PATCH to implement C++20 P0892R2 - explicit(bool) [v2]

2018-10-11 Thread Marek Polacek
On Thu, Oct 11, 2018 at 11:35:23AM -0400, Jason Merrill wrote: > > + /* [dcl.fct.spec] > > + "the constant-expression, if supplied, shall be a contextually > > + converted constant expression of type bool." */ > > + expr = build_explicit_specifier (expr,

[PATCH] PR libstdc++/77691 increase allocation size to at least alignment

2018-10-11 Thread Jonathan Wakely
It's not safe to assume that malloc(n) returns memory aligned to more than n, so when relying on the guaranteed alignment of malloc ensure that the number of bytes allocated is at least as large as the alignment. PR libstdc++/77691 * include/experimental/memory_resource

[PATCH] v3: C++: simplify output from suggest_alternatives_for

2018-10-11 Thread David Malcolm
On Thu, 2018-10-11 at 10:31 -0400, Jason Merrill wrote: > On Thu, Oct 11, 2018 at 10:28 AM Jason Merrill > wrote: > > > > On Wed, Oct 10, 2018 at 5:01 PM David Malcolm > > wrote: > > > On Tue, 2018-10-09 at 18:38 -0400, Jason Merrill wrote: > > > > On Tue, Oct 9, 2018 at 1:19 PM David Malcolm

[Patch, Fortran] PR58787 ICE (error recovery) in check_proc_interface

2018-10-11 Thread Tobias Burnus
Next patch, next try … The problem is the following: We have a use-associated symbol (a function) – which is once referenced (by use association). We now declare a same-name function in the 'contains' section. gfortran now parses the function name, fetches the symbol and reports that one

Re: [doc PATCH] using multiple format-arg attributes on a single function (PR 87593)

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Martin Sebor wrote: > Attached is a documentation-only patch to clarify the use case > of multiple distinct format_arg attributes on a single function. > It's far from obvious that the use case makes sense so explicitly > mentioning it should help avoid the mistake of

Re: [PATCH] PR libstdc++/80538 Only call sleep for non-zero values

2018-10-11 Thread Jonathan Wakely
On 11/10/18 17:37 +0100, Jonathan Wakely wrote: Avoid a system call when no sleep is required. Sleep in a loop (actually two loops) to handle interruption by signals. PR libstdc++/80538 * src/c++11/thread.cc (this_thread::__sleep_for) [_GLIBCXX_HAVE_SLEEP]: Only call

[doc PATCH] using multiple format-arg attributes on a single function (PR 87593)

2018-10-11 Thread Martin Sebor
Attached is a documentation-only patch to clarify the use case of multiple distinct format_arg attributes on a single function. It's far from obvious that the use case makes sense so explicitly mentioning it should help avoid the mistake of assuming that accepting it is due to the lack of better

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Jeff Law
On 10/11/18 3:05 PM, Peter Bergner wrote: > On 10/11/18 2:40 PM, Jeff Law wrote: >> On 10/11/18 1:23 PM, Peter Bergner wrote: >>> On 10/11/18 1:18 PM, Peter Bergner wrote: Ok, after working in gdb, I see that the PA-RISC port still uses reload and not LRA, but it too seems to have the

[PATCH, doc] describe mode checking for doloop_end pattern

2018-10-11 Thread Paul Koning
Updated with an additional item I just debugged. Since the code that uses the doloop_end pattern does not check the operand mode as given in the pattern, the pattern itself may need to do this, and that was not documented. In addition, if the doloop_end pattern is a define_expand, there must

Re: [PATCH] Optimize sin(atan(x)) and cos(atan(x)), take 3 (PR tree-optimization/86829)

2018-10-11 Thread Jeff Law
On 10/9/18 5:29 PM, Giuliano Augusto Faulin Belinassi wrote: > Fixed all issues pointed in the previous iteration. > There is now a significant change regarding how the sin(atan(x)) > constant is calculated, as now it checks for which values such that > computing 1 + x*x won't overflow. There are

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Peter Bergner
On 10/11/18 2:40 PM, Jeff Law wrote: > On 10/11/18 1:23 PM, Peter Bergner wrote: >> On 10/11/18 1:18 PM, Peter Bergner wrote: >>> Ok, after working in gdb, I see that the PA-RISC port still uses reload >>> and not LRA, but it too seems to have the same issue of reusing input >>> regs that have

[doc PATCH] mention interaction with noinline in flatten

2018-10-11 Thread Martin Sebor
While writing tests for attribute flatten I wasn't 100% sure from reading the manual if it would respect attribute noinline or if it would override it. Turns out it's the former so the attached patch mentions it in the manual. Unless there are objections I will commit the change tomorrow.

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Vladimir Makarov
On 10/11/2018 03:23 PM, Peter Bergner wrote: On 10/11/18 1:18 PM, Peter Bergner wrote: Ok, after working in gdb, I see that the PA-RISC port still uses reload and not LRA, but it too seems to have the same issue of reusing input regs that have REG_DEAD notes, so the question still stands. It's

Re: [PATCH 3/4] - Change sprintf to use new get_range_strlen overload

2018-10-11 Thread Jeff Law
On 10/10/18 4:36 PM, Jeff Law wrote: > On 10/2/18 10:37 AM, Martin Sebor wrote: >> [3/4] - Change sprintf to use new get_range_strlen overload >> >> This change makes use of the new get_range_strlen() overload >> in gimple-ssa-sprintf.c.  This necessitated a few changes to >> the API but also 

Use C++11 direct init in __debug::forward_list

2018-10-11 Thread François Dumont
This patch makes extensive use of C++11 direct init in __debug::forward_list. Doing so I also try to detect useless creation of safe iterators in debug implementation. In __debug::forward_list there are severals but I wonder if it is worth fixing those. Most of them are like this:  

Re: [C++ Patch] PR 71140 ("[concepts] ill-formed nested-requirement lacking a semicolon not rejected")

2018-10-11 Thread Paolo Carlini
Hi, On 11/10/18 20:36, Jason Merrill wrote: On Wed, Oct 3, 2018 at 8:18 AM Paolo Carlini wrote: a simple issue, we weren't correctly implementing 7.5.7.4 on the terminating semicolon. Tested x86_64-linux. If the missing semicolon is followed by }, let's allow it with a pedwarn. I see.

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Jeff Law
On 10/11/18 1:23 PM, Peter Bergner wrote: > On 10/11/18 1:18 PM, Peter Bergner wrote: >> Ok, after working in gdb, I see that the PA-RISC port still uses reload >> and not LRA, but it too seems to have the same issue of reusing input >> regs that have REG_DEAD notes, so the question still stands.

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Peter Bergner
On 10/11/18 1:18 PM, Peter Bergner wrote: > Ok, after working in gdb, I see that the PA-RISC port still uses reload > and not LRA, but it too seems to have the same issue of reusing input > regs that have REG_DEAD notes, so the question still stands. It's just > that whatever fix we come up with

[C++ PATCH] parser simplification

2018-10-11 Thread Nathan Sidwell
In working out how to orchestrate the preprocessor/parser dance that modules require, I came across the confused logic of cp_parser_translation_unit. It is only called once, but looks as if it used to be called multiple times, and retains the scar tissue from that. It also bails out on the

Re: [PATCH][AArch64] Support zero-extended move to FP register

2018-10-11 Thread Wilco Dijkstra
Here is the same version again with an extra test added: The popcount expansion uses SIMD instructions acting on 64-bit values. As a result a popcount of a 32-bit integer requires zero-extension before moving the zero-extended value into an FP register. This patch adds support for zero-extended

Re: [C++ Patch] PR 71140 ("[concepts] ill-formed nested-requirement lacking a semicolon not rejected")

2018-10-11 Thread Jason Merrill
On Wed, Oct 3, 2018 at 8:18 AM Paolo Carlini wrote: > a simple issue, we weren't correctly implementing 7.5.7.4 on the > terminating semicolon. Tested x86_64-linux. If the missing semicolon is followed by }, let's allow it with a pedwarn. Jason

Re: [C++ Patch] PR 85070 ("[8/9 Regression] ICE on C++ code: in lazily_declare_fn, at cp/method.c:2409")

2018-10-11 Thread Jason Merrill
OK. On Thu, Oct 11, 2018 at 1:59 PM Jakub Jelinek wrote: > > On Mon, Sep 24, 2018 at 12:48:56PM +0200, Paolo Carlini wrote: > > as explained in the audit trail, the gcc_assert added by Nathan triggers > > during error-recovery too, when add_method correctly returns false because > > it failed to

Re: [PATCH] v2: C++: suggestions for misspelled private members (PR c++/84993)

2018-10-11 Thread Jason Merrill
OK. On Fri, Sep 21, 2018 at 5:22 PM David Malcolm wrote: > > This is v2 of the patch; I managed to bit-rot my own patch due to my > fix for r264335, which tightened up the "is this meaningful" threshold > on edit distances when finding spelling correction candidates. > > The only change in this

Re: [C++ Patch] PR 85070 ("[8/9 Regression] ICE on C++ code: in lazily_declare_fn, at cp/method.c:2409")

2018-10-11 Thread Paolo Carlini
Hi, On 11/10/18 19:59, Jakub Jelinek wrote: On Mon, Sep 24, 2018 at 12:48:56PM +0200, Paolo Carlini wrote: as explained in the audit trail, the gcc_assert added by Nathan triggers during error-recovery too, when add_method correctly returns false because it failed to add the method. Thus it

Re: [PATCH 2/2 v3][IRA,LRA] Fix PR86939, IRA incorrectly creates an interference between a pseudo register and a hard register

2018-10-11 Thread Peter Bergner
On 10/10/18 7:57 PM, Peter Bergner wrote: > The problem is, that hard reg %r26 is defined in insn 32, to be used in > insn 33, so using %r26 as the reload reg is wrong, because it will clobber > the value we set in insn 32. Looking thru LRA, it looks like LRA assumes > that for a reload, if one

[patch] leverage linker relaxation on ppc vxworks RTPs

2018-10-11 Thread Olivier Hainque
Hello, Most VxWorks programs refer to kernel services at some point, and these often end up too far away for short calls on powerpc. This patch, originally contributed by Doug, arranges to request linker relaxation by default for RTPs. This helps many programs transparently, the feature has been

Re: [C++ Patch] PR 85070 ("[8/9 Regression] ICE on C++ code: in lazily_declare_fn, at cp/method.c:2409")

2018-10-11 Thread Jakub Jelinek
On Mon, Sep 24, 2018 at 12:48:56PM +0200, Paolo Carlini wrote: > as explained in the audit trail, the gcc_assert added by Nathan triggers > during error-recovery too, when add_method correctly returns false because > it failed to add the method. Thus it seems that we should simply loosen a > bit

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Martin Sebor wrote: > (Or are there some differences between the underscored forms and > the one without it)? They should always behave the same. > With a few exceptions (like aligned) the built-in returns false > for attributes that aren't attached to a node. I haven't

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Wilco Dijkstra wrote: > Hi, > > > Note that "will ever set errno" includes possibly setting it in the > > future, since code may be built with one libm version and used with > > another.  So it wouldn't be correct to have a "never sets errno" attribute > > on glibc logb /

[wwwdocs] steering.html - minor formatting changes and a spelling fix

2018-10-11 Thread Gerald Pfeifer
No change in terms of contents. Committed. Gerald Index: steering.html === RCS file: /cvs/gcc/wwwdocs/htdocs/steering.html,v retrieving revision 1.45 diff -u -r1.45 steering.html --- steering.html 30 Sep 2018 14:38:47 -

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Joseph Myers
On Thu, 11 Oct 2018, Wilco Dijkstra wrote: > For the new math functions all errno handling is already done in a > single function so you could do something like: if (want_errno) > set_errno (error). want_errno being a global (or TLS) variable gets into the same problems as _LIB_VERSION; you

Backports to gcc-8-branch

2018-10-11 Thread Jakub Jelinek
Hi! I've bootstrapped/regtested and committed following 4 backports from trunk to gcc-8-branch. Jakub 2018-10-11 Jakub Jelinek Backported from mainline 2018-09-12 Jakub Jelinek Andreas Krebbel PR tree-optimization/86844 *

Re: [PATCH, AArch64 v2 00/11] LSE atomics out-of-line

2018-10-11 Thread Richard Henderson
Ping. On 10/2/18 9:19 AM, Richard Henderson wrote: > Changes since v1: > * Use config/t-slibgcc-libgcc instead of gcc.c changes. > * Some style fixes. > * Ifdefs to work with old glibc. > > * Force TImode registers into even regnos. > Required by CASP, allowed by the ABI, and is seen

Re: [PATCH][AArch64] Fix PR87511

2018-10-11 Thread Richard Sandiford
Wilco Dijkstra writes: > As mentioned in PR87511, the shift used in aarch64_mask_and_shift_for_ubfiz_p > should be evaluated as a HOST_WIDE_INT rather than int. > > Passes bootstrap, OK for commit and backport? OK for both, thanks. Richard (Reviewing since this is really an rtl handling bug

[PATCH][AArch64] Fix PR87511

2018-10-11 Thread Wilco Dijkstra
As mentioned in PR87511, the shift used in aarch64_mask_and_shift_for_ubfiz_p should be evaluated as a HOST_WIDE_INT rather than int. Passes bootstrap, OK for commit and backport? ChangeLog: 2018-10-11 Wilco Dijkstra gcc/ * config/aarch64/aarch64.c

[PATCH] PR libstdc++/80538 Only call sleep for non-zero values

2018-10-11 Thread Jonathan Wakely
Avoid a system call when no sleep is required. Sleep in a loop (actually two loops) to handle interruption by signals. PR libstdc++/80538 * src/c++11/thread.cc (this_thread::__sleep_for) [_GLIBCXX_HAVE_SLEEP]: Only call sleep for non-zero values. Loop while sleep

Re: [PATCH] multiline.exp: complain about mismatched dg-{begin|end}-multiline-output

2018-10-11 Thread Jeff Law
On 10/11/18 8:20 AM, David Malcolm wrote: > Mismatched dg-{begin|end}-multiline-output directives are currently > silently ignored, leading to difficult-to-diagnose test failures > involving excess output. > > This patch makes multiline.exp complain about them. > > Successfully regrtested on

Re: [C++ Patch] PR 71139 ("[concepts] ill-formed compound-requirement lacking a semicolon not rejected")

2018-10-11 Thread Paolo Carlini
.. likewise. On 04/10/18 12:32, Paolo Carlini wrote: Hi, yesterday I didn't notice that we have a separate bug for a similar issue affecting cp_parser_compound_requirement. Tested x86_64-linux. Thanks, Paolo. PS: while working on these issues, I noticed that somewhere else in the concepts

Re: [C++ Patch] PR 71140 ("[concepts] ill-formed nested-requirement lacking a semicolon not rejected")

2018-10-11 Thread Paolo Carlini
Hi, already pinging this because it seems rather straightforward to me... On 03/10/18 14:18, Paolo Carlini wrote: Hi, a simple issue, we weren't correctly implementing 7.5.7.4 on the terminating semicolon. Tested x86_64-linux.     https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00173.html

Re: C++ PATCH to implement C++20 P0892R2 - explicit(bool) [v2]

2018-10-11 Thread Jason Merrill
On Wed, Oct 3, 2018 at 7:11 PM Marek Polacek wrote: > > On Wed, Oct 03, 2018 at 10:24:52AM -0400, Jason Merrill wrote: > > On Tue, Oct 2, 2018 at 5:25 PM Marek Polacek wrote: > > > > > > On Mon, Oct 01, 2018 at 07:47:10PM -0400, Jason Merrill wrote: > > > > On Mon, Oct 1, 2018 at 6:41 PM Marek

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Wilco Dijkstra
Hi,   > if (math_errhandling & MATH_ERRNO) == 0 a math > function may still set errno. > > it can only set it if there was an error though, > not arbitrarily clobber it, but this means that > > (1) reordering errno access around math calls is > invalid even with -fno-math-errno. It's typically

Re: [aarch64}: added variable issue rate feature for falkor

2018-10-11 Thread Kai Tietz
Hi, I reworked patch use a tuning flag instead of checking explicit for CPU flavor. I will send soon an update for it, which won't use the static variable anymore, and uses instead the SCHED-api. I would like first to get some comments on current version. Regards, Kai Jim Wilson

[PATCH, doc] describe mode checking for doloop_end pattern

2018-10-11 Thread Paul Koning
Since the code that uses the doloop_end pattern does not check the operand mode as given in the pattern, the pattern itself may need to do this, and that was not documented. This patch adds that information. It also updates the example to reflect this. Ok for trunk? paul ChangeLog:

Re: [PATCH] add simple attribute introspection

2018-10-11 Thread Martin Sebor
On 10/11/2018 06:04 AM, Joseph Myers wrote: On Thu, 11 Oct 2018, Martin Sebor wrote: The attached patch introduces a built-in function called __builtin_has_attribute that makes some of this possible. See the documentation and tests for details. I see nothing in the documentation about

Re: [Patch, Fortran] PR fortran/83522 – reject array-valued substrings

2018-10-11 Thread Paul Richard Thomas
The section from the standard in comment #2 is being misinterpreted. R609 and R610 concern substrings in the context of section 6.4, which concerns SCALARS! Section 6.5 concerns arrays and you will find there: R618 array-section is data-ref [ ( substring-range ) ] or complex-part-designator

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Wilco Dijkstra
Hi, > Note that "will ever set errno" includes possibly setting it in the > future, since code may be built with one libm version and used with > another.  So it wouldn't be correct to have a "never sets errno" attribute > on glibc logb / lround / llround / lrint / llrint / fma / remquo

Re: [PATCH] v2: C++: simplify output from suggest_alternatives_for

2018-10-11 Thread Jason Merrill
On Thu, Oct 11, 2018 at 10:28 AM Jason Merrill wrote: > > On Wed, Oct 10, 2018 at 5:01 PM David Malcolm wrote: > > On Tue, 2018-10-09 at 18:38 -0400, Jason Merrill wrote: > > > On Tue, Oct 9, 2018 at 1:19 PM David Malcolm > > > wrote: > > > > + /* Emulation of a "move" constructor, but really

Re: [PATCH] v2: C++: simplify output from suggest_alternatives_for

2018-10-11 Thread Jason Merrill
On Wed, Oct 10, 2018 at 5:01 PM David Malcolm wrote: > On Tue, 2018-10-09 at 18:38 -0400, Jason Merrill wrote: > > On Tue, Oct 9, 2018 at 1:19 PM David Malcolm > > wrote: > > > + /* Emulation of a "move" constructor, but really a copy > > > + constructor. */ > > > + > > > + name_hint

Re: [Patch, Fortran] PR fortran/83522 – reject array-valued substrings

2018-10-11 Thread David Edelsohn
Another data point: I tried some of the testcases with IBM XL Fortran compiler and it didn't complain or fail. I have no idea if this behavior is an IBM extension or how other Fortran compilers behave. GNU Fortran probably should be compatible with other Fortran compilers, even if the behavior

Re: [PATCH 09/25] Elide repeated RTL elements.

2018-10-11 Thread Andrew Stubbs
On 04/10/18 19:12, Jeff Law wrote: OK. Thanks for fixing the reader and adding selftests. Thanks, committed. Andrew

Re: [Patch, Fortran] PR fortran/83522 – reject array-valued substrings

2018-10-11 Thread David Edelsohn
Apparently this change also breaks CPU SPEC (465.tonto?). Is this really a correct change? Even if the testcases really are wrong, it seems that this change is going to break a lot of code in the wild. This seems like a very bad choice, even if it pedantically is correct. Thanks, David On

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Wilco Dijkstra
Joseph Myers wrote: > On Mon, 8 Oct 2018, Richard Biener wrote: >> So I think it would be fine if we'd have -fno-math-errno as documented >> and then the C library would annotate their math functions according >> to whether they will ever set errno or not.  Once a math function is >> const or

[ARM/FDPIC v3 21/21] [ARM][testsuite] FDPIC: Skip tests using architecture older than v7

2018-10-11 Thread Christophe Lyon
Since FDPIC requires an architecture >=7, these tests fail because they enforce and older version. They would pass if the compiler didn't bail out though. 2018-07-13 Christophe Lyon * gcc.target/arm/armv6-unaligned-load-ice.c: Add arm_arch effective-target. *

[ARM/FDPIC v3 20/21] [ARM][testsuite] FDPIC: Adjust pr43698.c to avoid clash with uclibc.

2018-10-11 Thread Christophe Lyon
uclibc defines bswap_32, so use a different name in this test. 2018-XX-XX Christophe Lyon gcc/testsuite/ * gcc.target/arm/pr43698.c (bswap_32): Rename as my_bswap_32. Change-Id: I2591bd911030814331cabf97ee5cf6cf8124b4f3 diff --git a/gcc/testsuite/gcc.target/arm/pr43698.c

[ARM/FDPIC v3 19/21] [ARM][testsuite] FDPIC: Enable tests on pie_enabled targets

2018-10-11 Thread Christophe Lyon
Some tests have the "nonpic" guard, but pass on arm*-*-uclinuxfdpiceabi because it is in PIE mode by default. Rather than adding this target to all these tests, add the "pie_enabled" effective target. 2018-XX-XX Christophe Lyon gcc/testsuite/ * g++.dg/cpp0x/noexcept03.C: Add

[ARM/FDPIC v3 18/21] [ARM][testsuite] FDPIC: Handle *-*-uclinux*

2018-10-11 Thread Christophe Lyon
Add *-*-uclinux* to tests that work on this target. 2018-XX-XX Christophe Lyon gcc/testsuite/ * g++.dg/abi/forced.C: Add *-*-uclinux*. * g++.dg/abi/guard2.C: Likewise. * g++.dg/ext/cleanup-10.C: Likewise. * g++.dg/ext/cleanup-11.C: Likewise. *

[ARM/FDPIC v3 17/21] [ARM][testsuite] FDPIC: Skip tests that don't work in PIC mode

2018-10-11 Thread Christophe Lyon
Some tests fail on arm*-*-uclinuxfdpiceabi because it generates PIC code and they don't support it: skip them. They also fail on arm*-linux* when forcing -fPIC. 2018-XX-XX Christophe Lyon gcc/testsuite/ * gcc.target/arm/eliminate.c: Accept only nonpic targets. *

[ARM/FDPIC v3 16/21] [ARM][testsuite] FDPIC: Skip v8-m and v6-m tests that currently produce an ICE

2018-10-11 Thread Christophe Lyon
v6-M and v8-M are not supported currently in FDPIC mode, it's better to skip the tests. 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/testsuite/ * gcc.target/arm/atomic-comp-swap-release-acquire-3.c: Skip on arm*-*-uclinuxfdpiceabi. *

[ARM/FDPIC v3 15/21] [ARM][testsuite] FDPIC: Adjust scan-assembler patterns.

2018-10-11 Thread Christophe Lyon
In FDPIC mode, r9 is saved in addition to other registers, so update the expected patterns accordingly. 2018-XX-XX Christophe Lyon Mickaël Guêné * gcc/testsuite/ * gcc.target/arm/interrupt-1.c: Add scan-assembler pattern for arm*-*-uclinuxfdpiceabi. *

[ARM/FDPIC v3 14/21] [ARM][testsuite] FDPIC: Skip unsupported tests

2018-10-11 Thread Christophe Lyon
Several tests cannot work on ARM-FDPIC for various reasons: skip them, or skip some directives. gcc.dg/20020312-2.c: Skip since it forces -fno-pic. gcc.target/arm/: * Skip since r9 is clobbered by assembly code: 20051215-1.c mmx-1.c pr61948.c pr77933-1.c pr77933-2.c * Skip since the

[ARM/FDPIC v3 12/21] [ARM] FDPIC: Restore r9 after we call __aeabi_read_tp

2018-10-11 Thread Christophe Lyon
We call __aeabi_read_tp() to get the thread pointer. Since this is a function call, we have to restore the FDPIC register afterwards. 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.c (arm_load_tp): Add FDPIC support. * config/arm/arm.md

[ARM/FDPIC v3 13/21] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2018-10-11 Thread Christophe Lyon
Without this, when we are unwinding across a signal frame we can jump to an even address which leads to an exception. This is needed in __gnu_persnality_sigframe_fdpic() when restoring the PC from the signal frame since the PC saved by the kernel has the LSB bit set to zero. 2018-XX-XX

[ARM/FDPIC v3 11/21] [ARM] FDPIC: Add support to unwind FDPIC signal frame

2018-10-11 Thread Christophe Lyon
2018-XX-XX Christophe Lyon Mickaël Guêné libgcc/ * unwind-arm-common.inc (ARM_SET_R7_RT_SIGRETURN) (THUMB2_SET_R7_RT_SIGRETURN, FDPIC_LDR_R12_WITH_FUNCDESC) (FDPIC_LDR_R9_WITH_GOT, FDPIC_LDR_PC_WITH_RESTORER) (FDPIC_FUNCDESC_OFFSET,

[ARM/FDPIC v3 10/21] [ARM] FDPIC: Implement TLS support.

2018-10-11 Thread Christophe Lyon
Support additional relocations: TLS_GD32_FDPIC, TLS_LDM32_FDPIC, and TLS_IE32_FDPIC. We do not support the GNU2 TLS dialect. 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.c (tls_reloc): Add TLS_GD32_FDPIC, TLS_LDM32_FDPIC and TLS_IE32_FDPIC.

[ARM/FDPIC v3 09/21] [ARM] FDPIC: Add support for taking address of nested function

2018-10-11 Thread Christophe Lyon
In FDPIC mode, the trampoline generated to support pointers to nested functions looks like: .wordtrampoline address .wordtrampoline GOT address ldr r12, [pc, #8] ldr r9, [pc, #8] ldr pc, [pc, #8]

Re: [C++ PATCH] Fix -Wreturn-local-addr handling of structured bindings (PR c++/87582)

2018-10-11 Thread Jason Merrill
OK. On Thu, Oct 11, 2018 at 8:52 AM Jakub Jelinek wrote: > > Hi! > > Except for std::tuple* structured bindings, the VAR_DECLs we create for the > identifiers aren't actually variables, but placeholders with > DECL_VALUE_EXPR. If the structured binding is not a reference, it is still > an

[ARM/FDPIC v3 08/21] [ARM] FDPIC: Ensure local/global binding for function descriptors

2018-10-11 Thread Christophe Lyon
Use local binding rules to decide whether we can use GOTOFFFUNCDESC to compute the function address. 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.c (arm_local_funcdesc_p): New function. (legitimize_pic_address): Ensure binding rules on

[ARM/FDPIC v3 07/21] [ARM] FDPIC: Avoid saving/restoring r9 on stack since it is RO

2018-10-11 Thread Christophe Lyon
2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Handle FDPIC. (thumb1_compute_save_core_reg_mask): Likewise. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 92ae24b..a6dce36 100644 ---

[ARM/FDPIC v3 06/21] [ARM] FDPIC: Add support for c++ exceptions

2018-10-11 Thread Christophe Lyon
The main difference with existing support is that function addresses are function descriptor addresses instead. This means that all code dealing with function pointers now has to cope with function descriptors instead. For the same reason, Linux kernel helpers can no longer be called by

[ARM/FDPIC v3 05/21] [ARM] FDPIC: Fix __do_global_dtors_aux and frame_dummy generation

2018-10-11 Thread Christophe Lyon
In FDPIC, we need to make sure __do_global_dtors_aux and frame_dummy are referenced by their address, not by pointers to the function descriptors. 2018-XX-XX Christophe Lyon Mickaël Guêné * libgcc/crtstuff.c: Add support for FDPIC. Change-Id:

[ARM/FDPIC v3 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture

2018-10-11 Thread Christophe Lyon
The FDPIC register is hard-coded to r9, as defined in the ABI. We have to disable tailcall optimizations if we don't know if the target function is in the same module. If not, we have to set r9 to the value associated with the target module. When generating a symbol address, we have to take into

[ARM/FDPIC v3 03/21] [ARM] FDPIC: Force FDPIC related options unless -mno-fdpic is provided

2018-10-11 Thread Christophe Lyon
In FDPIC mode, we set -fPIE unless the user provides -fno-PIE, -fpie, -fPIC or -fpic: indeed FDPIC code is PIC, but we want to generate code for executables rather than shared libraries by default. We also make sure to use the --fdpic assembler option, and select the appropriate linker emulation.

[ARM/FDPIC v3 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2018-10-11 Thread Christophe Lyon
The new arm-uclinuxfdpiceabi target behaves pretty much like arm-linux-gnueabi. In order the enable the same set of features, we have to update several configure scripts that generally match targets like *-*-linux*: in most places, we add *-uclinux* where there is already *-linux*, or uclinux*

[ARM/FDPIC v3 01/21] [ARM] FDPIC: Add -mfdpic option support

2018-10-11 Thread Christophe Lyon
2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.opt: Add -mfdpic option. * doc/invoke.texi: Add documentation for -mfdpic. diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index a1286a4..231c1cb 100644 --- a/gcc/config/arm/arm.opt

[ARM/FDPIC v3 00/21] FDPIC ABI for ARM

2018-10-11 Thread Christophe Lyon
Hello, This patch series implements the GCC contribution of the FDPIC ABI for ARM targets. This ABI enables to run Linux on ARM MMU-less cores and supports shared libraries to reduce the memory footprint. Without MMU, text and data segments relative distances are different from one process to

[PATCH] multiline.exp: complain about mismatched dg-{begin|end}-multiline-output

2018-10-11 Thread David Malcolm
Mismatched dg-{begin|end}-multiline-output directives are currently silently ignored, leading to difficult-to-diagnose test failures involving excess output. This patch makes multiline.exp complain about them. Successfully regrtested on x86_64-pc-linux-gnu OK for trunk?

[committed] libcpp: show macro definition when used with wrong argument count

2018-10-11 Thread David Malcolm
Consider: demo.c: In function 'test': demo.c:5:40: error: macro "LOG_2" requires 3 arguments, but only 2 given 5 | LOG_2 ("loading file: %s\n", filename); |^ This patch adds a note showing the definition of the macro in question, giving: demo.c: In

Re: [PATCH] Switch conversion: support any ax + b transformation (PR tree-optimization/84436).

2018-10-11 Thread Alexander Monakov
On Thu, 11 Oct 2018, Martin Liška wrote: > Hi. > > As seen in the PR, switch conversion can do better when we return equal > numbers > based on index value. I implemented more than that, more precisely I support > all linear > transformation based on index value. It's the same what clang is

Re: [PATCH v3] Change default to -fno-math-errno

2018-10-11 Thread Wilco Dijkstra
Hi Jeff, > So I went back and reviewed all the discussion around this.  I'm still > having trouble getting comfortable with flipping the default -- unless > we know ahead of time that the target runtime doesn't set errno on any > of the math routines.  That implies a target hook to describe the >

Re: [PATCH] Switch conversion: support any ax + b transformation (PR tree-optimization/84436).

2018-10-11 Thread Jakub Jelinek
On Thu, Oct 11, 2018 at 02:56:14PM +0200, Martin Liška wrote: > As seen in the PR, switch conversion can do better when we return equal > numbers > based on index value. I implemented more than that, more precisely I support > all linear > transformation based on index value. It's the same what

[PATCH][committed][i386] Unify bdver?_cost

2018-10-11 Thread Richard Biener
They are 1:1 the same. Bootstrapped on x86_64-unknown-linux-gnu, applied. Richard. 2018-10-11 Richard Biener * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset, bdver?_cost): Unify to ... (bdver_memcpy, bdver_memset, bdver_cost): ... this. *

[PATCH] Switch conversion: support any ax + b transformation (PR tree-optimization/84436).

2018-10-11 Thread Martin Liška
Hi. As seen in the PR, switch conversion can do better when we return equal numbers based on index value. I implemented more than that, more precisely I support all linear transformation based on index value. It's the same what clang is capable of. Patch survives testing on x86_64-linux-gnu. I

  1   2   >