Re: [PATCH] x86-64: {,V}CVTSI2Sx are ambiguous without suffix

2019-01-04 Thread Jan Beulich
>>> On 21.12.18 at 14:55, wrote: > On Fri, Dec 21, 2018 at 9:08 AM Jan Beulich wrote: >> >> For 64-bit these should not be emitted without suffix in AT&T mode (as >> being ambiguous that way); the suffixes are benign for 32-bit. For >> consistency also omit the suffix in Intel mode for {,V}CVTSI2

Re: [PATCH] x86-64: {,V}CVTSI2Sx are ambiguous without suffix

2019-01-04 Thread Uros Bizjak
On Fri, Jan 4, 2019 at 9:28 AM Jan Beulich wrote: > > >>> On 21.12.18 at 14:55, wrote: > > On Fri, Dec 21, 2018 at 9:08 AM Jan Beulich wrote: > >> > >> For 64-bit these should not be emitted without suffix in AT&T mode (as > >> being ambiguous that way); the suffixes are benign for 32-bit. For >

Re: [PATCH][GCC][Aarch64] Change expected bfxil count in gcc.target/aarch64/combine_bfxil.c to 18 (PR/87763)

2019-01-04 Thread Sam Tebbs
On 12/19/18 4:47 PM, Sam Tebbs wrote: > Hi all, > > Since r265398 (combine: Do not combine moves from hard registers), the bfxil > scan in gcc.target/aarch64/combine_bfxil.c has been failing. > > FAIL: gcc.target/aarch64/combine_bfxil.c scan-assembler-times bfxil\\t 13 > > This is because bfi was

Re: [Fortran, test case, committed] Test case for PR 48543

2019-01-04 Thread Thomas Koenig
Am 03.01.19 um 23:18 schrieb Jakub Jelinek: On Thu, Jan 03, 2019 at 01:36:30PM +0100, Thomas Koenig wrote: Hi Jakub, In any case, IMHO the test should be removed or XFAILed for now. thanks for your explanations. I have removed the test case. You've actually removed a different testcase (wh

[GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch)

2019-01-04 Thread Tamar Christina
Hi All, This is an updated version of my first patch which moves part of the type conversion code from convert.c to match.pd because match.pd is able to apply this transformation in the presence of intermediate temporary variables. The previous patch was only regtested on aarch64-none-linux-gnu

[PATCH] PR60563 - FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*

2019-01-04 Thread Dominique d'Humières
Is the following patch OK for trunk and the release branches? 2019-01-04 Dominique d'Humieres * g++.dg/ext/sync-4.C: Add dg-xfail-run-if for darwin. --- ../_clean/gcc/testsuite/g++.dg/ext/sync-4.C 2015-04-30 23:36:40.0 +0200 +++ gcc/testsuite/g++.dg/ext/sync-4.C 2019-01-03

Re: [PATCH] Fix -fsanitize=address with > 32 byte aligned vars (PR sanitizer/88619)

2019-01-04 Thread Martin Liška
On 1/3/19 11:44 PM, Jakub Jelinek wrote: > Hi! > > The prev_offset we push into the vector is supposed to be the end of > the red zone for the variable, it needs to be ASAN_MIN_RED_ZONE_SIZE > aligned, but by aligning it more we can end up with red zone with negative > size. E.g. on the testcase,

Re: [PATCH][AArch64] Use Q-reg loads/stores in movmem expansion

2019-01-04 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01560.html Thanks, Kyrill On 21/12/18 12:30, Kyrill Tkachov wrote: Hi all, Our movmem expansion currently emits TImode loads and stores when copying 128-bit chunks. This generates X-register LDP/STP sequences as these are the most preferred

[PATCH] Avoid spurious test failures when -fno-inline in test flags

2019-01-04 Thread Jonathan Wakely
These tests rely on inlining, so if -fno-inline is added to the compiler flags the tests fail. Use the predefined __NO_INLINE__ macro to detect that situation, and don't bother testing the move assignment. * testsuite/21_strings/basic_string/modifiers/assign/char/ move_assign_opti

[PATCH] Fix concatenation bug in filesystem::path

2019-01-04 Thread Jonathan Wakely
When erasing a trailing empty filename component, the output iterator was not decremented, causing the next component to be created at the wrong position. * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix incorrect treatment of empty filename after trailing slash.

[1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Richard Sandiford
The PR has: vect__6.24_42 = vect__5.23_41 * { 0.0, 1.0e+0, 0.0, 0.0 }; which for -fno-signed-zeros -fno-signaling-nans can be simplified to: vect__6.24_42 = vect__5.23_41 & { 0, -1, 0, 0 }; I deliberately didn't handle COMPLEX_CST or CONSTRUCTOR in initializer_each_zero_or_onep since th

[2/2] PR88598: Optimise reduc (bit_and)

2019-01-04 Thread Richard Sandiford
This patch folds certain reductions of X & CST to X[I] & CST[I] if I is the only nonzero element of CST. This includes the motivating case in which CST[I] is -1. We could do the same for REDUC_MAX on unsigned types, but I wasn't sure that that special case was worth it. Tested on aarch64-linux-g

Re: [1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Eric Botcazou
> Index: gcc/tree.c > === > --- gcc/tree.c2019-01-04 11:39:24.810266962 + > +++ gcc/tree.c2019-01-04 11:40:33.141683783 + > @@ -11229,6 +11229,60 @@ initializer_zerop (const_tree init, bool > } > } > > +/

Re: [1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Richard Sandiford
Eric Botcazou writes: >> Index: gcc/tree.c >> === >> --- gcc/tree.c 2019-01-04 11:39:24.810266962 + >> +++ gcc/tree.c 2019-01-04 11:40:33.141683783 + >> @@ -11229,6 +11229,60 @@ initializer_zerop (const_tree init,

Re: [PATCH] genattrtab bit-rot, and if_then_else in values

2019-01-04 Thread Richard Sandiford
Alan Modra writes: > On Thu, Jan 03, 2019 at 07:03:59PM +, Richard Sandiford wrote: >> Richard Sandiford writes: >> > This still seems risky and isn't what the name and function comment > > OK, how about this delta from the previous patch to ameliorate the > maintenance risk? attr_value_alig

Re: [1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Jakub Jelinek
On Fri, Jan 04, 2019 at 12:13:13PM +, Richard Sandiford wrote: > > Can we avoid the gratuitous use of template here? We were told that C++ > > would > > be used only when it makes things more straightforward and it's the > > contrary > > in this case, to wit the need for the ugly RECURSE m

Re: [1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Eric Botcazou
> I did it that way so that it would be easy to add things like > zero_or_minus_onep without cut-&-pasting the whole structure. Yes, I inferred that, but people can still templatize afterward if need be. Following this line of reasoning, why to limit yourself to this arbitrary number of 2 values

Re: [1/2] PR88598: Optimise x * { 0 or 1, 0 or 1, ... }

2019-01-04 Thread Richard Sandiford
Jakub Jelinek writes: > On Fri, Jan 04, 2019 at 12:13:13PM +, Richard Sandiford wrote: >> > Can we avoid the gratuitous use of template here? We were told that C++ >> > would >> > be used only when it makes things more straightforward and it's the >> > contrary >> > in this case, to wit t

Re: [PATCH] Fix -fsanitize=address with > 32 byte aligned vars (PR sanitizer/88619)

2019-01-04 Thread Martin Liška
On 1/4/19 11:57 AM, Martin Liška wrote: > I'm going to trigger asan-bootstrap on one of them. Works for me on gcc112.fsffrance.org machine (ppc64le). Martin

[PATCH] Fix bugs in filesystem::path::lexically_normal()

2019-01-04 Thread Jonathan Wakely
Using path::_List::erase(const_iterator) to remove a non-final component in path::lexically_normal() is a bug, because it leaves the following component with an incorrect _M_pos value. Instead of providing erase members that allow removing components from the middle, replace them with pop_back()

Re: C++ PATCH for c++/88548, this accepted in static member functions

2019-01-04 Thread Marek Polacek
Ping. On Sat, Dec 22, 2018 at 04:38:30PM -0500, Marek Polacek wrote: > I noticed that we weren't diagnosing using 'this' in noexcept-specifiers > of static member functions, and Jakub pointed out that this is also true > for trailing-return-type. cp_parser has local_variables_forbidden_p to > det

Re: C++ PATCH to implement deferred parsing of noexcept-specifiers (c++/86476, c++/52869)

2019-01-04 Thread Marek Polacek
Ping. On Wed, Dec 19, 2018 at 03:27:31PM -0500, Marek Polacek wrote: > Prompted by Jon's observation in 52869, I noticed that we don't treat > a noexcept-specifier as a complete-class context of a class ([class.mem]/6). > As with member function bodies, default arguments, and NSDMIs, names used in

[PATCH, C++,rebased] Fix PR c++/88261

2019-01-04 Thread Bernd Edlinger
On 12/22/18 7:53 PM, Bernd Edlinger wrote: > On 12/21/18 2:03 AM, Martin Sebor wrote: >> On 12/20/18 2:07 PM, Bernd Edlinger wrote: >>> On 12/20/18 6:50 PM, Martin Sebor wrote: On 12/20/18 10:46 AM, Martin Sebor wrote: > On 12/17/18 7:58 AM, Jason Merrill wrote: >> On 12/15/18 3:36 AM,

[PATCH] Fix test failure with old Copy-On-Write std::string

2019-01-04 Thread Jonathan Wakely
* testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static assertion failures with old std::string ABI. Tested x86_64-linux, committed to trunk. commit 043782108101ec994884185e058d79ee4e19b57e Author: Jonathan Wakely Date: Fri Jan 4 14:14:01 2019 + Fix test fa

Re: [PATCH][GCC][Aarch64] Change expected bfxil count in gcc.target/aarch64/combine_bfxil.c to 18 (PR/87763)

2019-01-04 Thread Sudakshina Das
Hi Sam On 04/01/19 10:26, Sam Tebbs wrote: > > On 12/19/18 4:47 PM, Sam Tebbs wrote: > >> Hi all, >> >> Since r265398 (combine: Do not combine moves from hard registers), the bfxil >> scan in gcc.target/aarch64/combine_bfxil.c has been failing. >> >> FAIL: gcc.target/aarch64/combine_bfxil.c scan

[PATCH] Remove XFAIL from test that no longer fails

2019-01-04 Thread Jonathan Wakely
This test started passing with the old ABI with r263808, so doesn't need to be marked XFAIL now. * testsuite/21_strings/basic_string/requirements/ explicit_instantiation/debug.cc: Remove XFAIL for old ABI. Tested x86_64-linux, committed to trunk. commit c44a290e8ace25ec3ff2f3adc

Re: [PATCH][GCC][Aarch64] Change expected bfxil count in gcc.target/aarch64/combine_bfxil.c to 18 (PR/87763)

2019-01-04 Thread Sam Tebbs
On 1/4/19 3:49 PM, Sudakshina Das wrote: > Hi Sam > > On 04/01/19 10:26, Sam Tebbs wrote: >> On 12/19/18 4:47 PM, Sam Tebbs wrote: >> >>> Hi all, >>> >>> Since r265398 (combine: Do not combine moves from hard registers), the bfxil >>> scan in gcc.target/aarch64/combine_bfxil.c has been failing. >>

Re: [PATCH][GCC][Aarch64] Change expected bfxil count in gcc.target/aarch64/combine_bfxil.c to 18 (PR/87763)

2019-01-04 Thread Wilco Dijkstra
Hi Sam, This is a trivial test fix, so it falls under the obvious rule and can be committed without approval - https://www.gnu.org/software/gcc/svnwrite.html Cheers, Wilco

Re: [PATCH][GCC][Aarch64] Change expected bfxil count in gcc.target/aarch64/combine_bfxil.c to 18 (PR/87763)

2019-01-04 Thread Sam Tebbs
On 1/4/19 4:19 PM, Wilco Dijkstra wrote: > Hi Sam, > > This is a trivial test fix, so it falls under the obvious rule and can be > committed without approval - https://www.gnu.org/software/gcc/svnwrite.html > > Cheers, > Wilco Hi Wilco, Thanks, committed as r267579.

Re: [patch] Fix PR rtl-optimization/87727

2019-01-04 Thread Vladimir Makarov
On 12/28/2018 11:13 AM, Peter Bergner wrote: On 12/21/18 9:24 AM, Vladimir Makarov wrote: Peter, also if you are interesting to do RA work, there is another problem which is to implement sub-register level conflict calculations in LRA. Currently, IRA has a simple subregister level conflict ca

Re: [PATCH 2/3][GCC][AARCH64] Add new -mbranch-protection option to combine pointer signing and BTI

2019-01-04 Thread Sam Tebbs
On 12/20/18 4:38 PM, Sam Tebbs wrote: > On 11/22/18 4:54 PM, Sam Tebbs wrote: >> On 11/12/18 6:24 PM, Sudakshina Das wrote: >>> Hi Sam >>> >>> On 02/11/18 17:31, Sam Tebbs wrote: Hi all, The -mbranch-protection option combines the functionality of -msign-return-address and the

Re: [PATCH 3/3][GCC][AARCH64] Add support for pointer authentication B key

2019-01-04 Thread Sam Tebbs
On 12/21/18 3:00 PM, Sam Tebbs wrote: > On 11/9/18 11:04 AM, Sam Tebbs wrote: >> On 11/02/2018 06:01 PM, Sam Tebbs wrote: >> >>> On 11/02/2018 05:35 PM, Sam Tebbs wrote: >>> Hi all, This patch adds support for the Armv8.3-A pointer authentication instructions that use the

Re: [PATCH] Disable gdb pagination temporarily in gdbinit.in

2019-01-04 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > After upgrading gdb recently gdb ./cc1 etc. asks me to > --Type for more, q to quit, c to continue without paging-- > on start, because the stuff it prints by default + all the > File tree.h will be skipped when stepping. > File is-a.h will be skipped when stepping

Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch)

2019-01-04 Thread Marc Glisse
+(convert:newtype (op (convert:newtype @1) (convert:newtype @2))) The outer 'convert' is unnecessary, op already has the same type. + (nop:type (op (convert:ty1 @1) (convert:ty2 @2) Please don't use 'nop' directly, use 'convert' instead. This line is very suspiciou

Re: [PATCH] attribute copy, leaf, weakref and -Wmisisng-attributes (PR 88546)

2019-01-04 Thread Joseph Myers
On Thu, 3 Jan 2019, Martin Sebor wrote: > Ping: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01616.html This is OK (with the typo fix Jakub noted). -- Joseph S. Myers jos...@codesourcery.com

Re: [C++ Patch] [PR c++/88146] do not crash synthesizing inherited ctor(...)

2019-01-04 Thread Jason Merrill
On 12/28/18 9:33 PM, Alexandre Oliva wrote: On Dec 28, 2018, Alexandre Oliva wrote: I guess I still need to fill in other gaps to in my knowledge to try and make sense of it. Done. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c Here's a patch based on your suggestion. [PR88146] do

Re: [PATCH] Avoid spurious test failures when -fno-inline in test flags

2019-01-04 Thread Jonathan Wakely
On 04/01/19 11:38 +, Jonathan Wakely wrote: These tests rely on inlining, so if -fno-inline is added to the compiler flags the tests fail. Use the predefined __NO_INLINE__ macro to detect that situation, and don't bother testing the move assignment. * testsuite/21_strings/basic_strin

Re: PING #2 [PATCH] accept all C integer types in function parameters referenced by alloc_align (PR 88363)

2019-01-04 Thread Joseph Myers
This patch is OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH, C++,rebased] Fix PR c++/88261

2019-01-04 Thread Jason Merrill
On 1/4/19 10:30 AM, Bernd Edlinger wrote: On 12/22/18 7:53 PM, Bernd Edlinger wrote: On 12/21/18 2:03 AM, Martin Sebor wrote: On 12/20/18 2:07 PM, Bernd Edlinger wrote: On 12/20/18 6:50 PM, Martin Sebor wrote: On 12/20/18 10:46 AM, Martin Sebor wrote: On 12/17/18 7:58 AM, Jason Merrill wrote

Re: [testsuite] Fix gcc.dg/debug/dwarf2/inline5.c with Solaris as (PR debug/87451)

2019-01-04 Thread Rainer Orth
Hi Richard, >> On Thu, 3 Jan 2019, Rainer Orth wrote: >> >>> gcc.dg/debug/dwarf2/inline5.c currently FAILs with Solaris as (both >>> sparc and x86): >>> >>> FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not (DIE >>> (0x([0-9a-f]*)) DW_TAG_lexical_block)[^#/!]*[#/!] >>> [^(].*

[PATCH] restore CFString handling in attribute format (PR 88638)

2019-01-04 Thread Martin Sebor
The improved handling of attribute positional arguments added in r266195 introduced a regression on Darwin where attribute format with the CFString archetype accepts CFString* parameter types in positions where only char* would otherwise be allowed. This is specific to Darwin so it didn't show up

Re: [PATCH, C++,rebased] Fix PR c++/88261

2019-01-04 Thread Bernd Edlinger
On 1/4/19 10:22 PM, Jason Merrill wrote: > On 1/4/19 10:30 AM, Bernd Edlinger wrote: >> On 12/22/18 7:53 PM, Bernd Edlinger wrote: >>> On 12/21/18 2:03 AM, Martin Sebor wrote: On 12/20/18 2:07 PM, Bernd Edlinger wrote: > On 12/20/18 6:50 PM, Martin Sebor wrote: >> On 12/20/18 10:46 AM,

Re: [PATCH] restore CFString handling in attribute format (PR 88638)

2019-01-04 Thread Mike Stump
On Jan 4, 2019, at 2:03 PM, Martin Sebor wrote: > > The improved handling of attribute positional arguments added > in r266195 introduced a regression on Darwin where attribute > format with the CFString archetype accepts CFString* parameter > types in positions where only char* would otherwise b

Re: [PATCH] PR60563 - FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*

2019-01-04 Thread Mike Stump
On Jan 4, 2019, at 2:56 AM, Dominique d'Humières wrote: > > Is the following patch OK for trunk and the release branches? Ok. > 2019-01-04 Dominique d'Humieres > > * g++.dg/ext/sync-4.C: Add dg-xfail-run-if for darwin. > > --- ../_clean/gcc/testsuite/g++.dg/ext/sync-4.C 2015-04

[PATCH] Add a two value VR comparison to two consecutive PHI args optimization (PR tree-optimization/88676)

2019-01-04 Thread Jakub Jelinek
Hi! The following patch adds an optimization, if we know certain SSA_NAME has two possible values and have GIMPLE_COND EQ_EXPR/NE_EXPR of that SSA_NAME with one of the two values and PHI which has two adjacent constants, we can optimize it into addition or subtraction. Bootstrapped/regtested on x

[PATCH] Fix ICU miscompilation due to tree-ssa-strlen.c bug (PR tree-optimization/88693)

2019-01-04 Thread Jakub Jelinek
Hi! The following patch fixes ICU miscompilation, where an initial part of a buffer is initializer from non-zero terminated string literal (in ICU actually from an array of non-zero chars that the FE newly turns into non-zero terminated string literal), but the code recently added to tree-ssa-strl

[C++ PATCH] Avoid ICE trying to add a bogus fixit hint (PR c++/88554)

2019-01-04 Thread Jakub Jelinek
Hi! As found by Jonathan, we shouldn't be trying to emit return *this; fixit hint in non-methods where this is not available (and ICEing because current_class_ref is NULL there). I've just added a testcase for Jon's patch from the PR and merged two nested ifs into one. Bootstrapped/regtested on x

[PATCH] Add allocator-extended copy/move ctors to COW string

2019-01-04 Thread Jonathan Wakely
Add these constructors from C++11 which were missing from the COW basic_string. Additionally simplify the definitions of the basic_string::reference and basic_string::const_reference types as required by C++11. This allows filesystem::path::string() to be simplified, so that the same code is used

[PATCH] Export explicit instantiations for C++17 members of std::string

2019-01-04 Thread Jonathan Wakely
The C++17 standard added some new members to std::basic_string, which were not previously instantiated in the library. This meant that the extern template declarations had to be disabled for C++17 mode. With this patch the new members are instantiated in the library and so the explicit instantiati

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

2019-01-04 Thread Steve Ellcey
On Thu, 2018-12-06 at 12:25 +, Richard Sandiford wrote: > > Since we're looking at the call insns anyway, we could have a hook that > "jousts" two calls and picks the one that preserves *fewer* registers. > This would mean that loop produces a single instruction that conservatively > describes

Re: PATCH: Updated error messages for ill-formed cases of array initialization by string literal

2019-01-04 Thread Martin Sebor
On 12/27/18 1:49 PM, Tom Honermann wrote: As requested by Jason in the review of the P0482 (char8_t) core language changes, this patch includes updates to the error messages emitted for ill-formed cases of array initialization with a string literal.  With these changes, error messages that prev

libgo patch committed: Avoid deadlock if SIGPROF arrives during traceback

2019-01-04 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang prevent deadlock when a profiling signal arrives during traceback. Traceback routines, e.g. callers and funcentry, may call __go_get_backtrace_state. If a profiling signal arrives while we are in the critical section of __go_get_backtrace_state, it tries to do a t

Re: [REVISED PATCH 1/9]: C++ P0482R5 char8_t: Documentation updates

2019-01-04 Thread Martin Sebor
On 12/23/18 7:27 PM, Tom Honermann wrote: Attached is a revised patch that addresses feedback provided by Jason and Sandra.  Changes from the prior patch include: - Updates to the -fchar8_t option documentation as requested by Jason. - Corrections for indentation, spacing, hyphenation, and wrapp

Re: [PATCH] Fix ICU miscompilation due to tree-ssa-strlen.c bug (PR tree-optimization/88693)

2019-01-04 Thread Jeff Law
On 1/4/19 3:54 PM, Jakub Jelinek wrote: > Hi! > > The following patch fixes ICU miscompilation, where an initial part of a > buffer is initializer from non-zero terminated string literal (in ICU > actually from an array of non-zero chars that the FE newly turns into > non-zero terminated string li

[PATCH] PR fortran/69101 -- IEEE_SELECTED_REAL_KIND part I

2019-01-04 Thread Steve Kargl
2019-01-04 Steven G. Kargl PR fortran/69101 * expr.c (gfc_check_init_expr): If errors were emitted during simplification of ieee_selected_real_kind(), clear any additional errors anre return false. * simplify.c (simplify_ieee_selected_real_kind): make