RE: [patch][x86] Split-up march icelake on march=icelake-server and march=icelake-client

2018-03-14 Thread Koval, Julia
Small fix. gcc/ * config.gcc (icelake-client, icelake-server): New. (icelake): Remove. * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit. (initial_ix86_arch_features): Ditto. (PTA_SKYLAKE): Add SGX. (PTA_ICELAKE): Remove. (P

RE: [x86,avx] Fix __builtin_cpu_supports for icelake and cannonlake isa

2018-03-14 Thread Koval, Julia
Gentle ping. > -Original Message- > From: Koval, Julia > Sent: Monday, February 12, 2018 10:57 AM > To: Kirill Yukhin > Cc: 'GCC Patches' > Subject: RE: [x86,avx] Fix __builtin_cpu_supports for icelake and cannonlake > isa > > Hi, > > There is no PR for this. This builtin was just mis

Re: [PR84682] disregard address constraints on non-addresses

2018-03-14 Thread Alexandre Oliva
On Mar 12, 2018, "Bin.Cheng" wrote: > internal compiler error: in aarch64_classify_address, at > config/aarch64/aarch64.c:5678 > 0xfe3c29 aarch64_classify_address > /.../build/src/gcc/gcc/config/aarch64/aarch64.c:5677 > 0xfe8be8 aarch64_legitimate_address_hook_p > /.../build/src/gcc/gcc/c

Re: [AArch64] Add SVE mul_highpart patterns

2018-03-14 Thread Christophe Lyon
On 8 February 2018 at 14:54, Richard Sandiford wrote: > One advantage of the new permute handling compared to the old way is > that we can now easily take advantage of the vectoriser's divmod patterns > for SVE. > > I realise we're in stage 4, but this is entirely SVE-specific. > > Tested on aarch

Re: [PATCH] Fix -march=bdver1 ICE on int to float conversion (PR target/84844)

2018-03-14 Thread Uros Bizjak
On Tue, Mar 13, 2018 at 9:30 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in bugzilla, when e.g. sel-sched queries (indirectly) before > reload > some attributes like get_attr_type that depend on alternatives, GCC attempts > to constrain the operands in non-strict mode, which implies that if >

Re: [PATCH] Fix -march=bdver1 ICE on int to float conversion (PR target/84844)

2018-03-14 Thread Uros Bizjak
On Wed, Mar 14, 2018 at 9:36 AM, Uros Bizjak wrote: > On Tue, Mar 13, 2018 at 9:30 PM, Jakub Jelinek wrote: >> Hi! >> >> As mentioned in bugzilla, when e.g. sel-sched queries (indirectly) before >> reload >> some attributes like get_attr_type that depend on alternatives, GCC attempts >> to const

[AARCH64 PATCH] Fix shift+rotate patterns with masking (PR target/84845)

2018-03-14 Thread Jakub Jelinek
Hi! The following testcase ICEs on aarch64-linux, because combiner matches the (insn 25 24 26 2 (set (reg:DI 114) (rotatert:DI (reg:DI 115 [ d ]) (subreg:QI (neg:SI (and:SI (reg:SI 112) (const_int 65535 [0x]))) 0))) "pr84845.c":8 664 {*aarch64_reg_d

Re: [PATCH] Fix ptr-overflow sanopt optimization (PR sanitizer/83392)

2018-03-14 Thread Richard Biener
On Tue, 13 Mar 2018, Jakub Jelinek wrote: > Hi! > > The sanopt maybe_optimize_ubsan_ptr_ifn optimization behaves differently > on 32-bit and on 64-bit targets when using similar arguments maximum or > minimum of ptrdiff_t or values close to it. > > The problem is that UHWI is 64-bit, regardless

Re: [patch][x86] Split-up march icelake on march=icelake-server and march=icelake-client

2018-03-14 Thread Uros Bizjak
On Wed, Mar 14, 2018 at 8:44 AM, Koval, Julia wrote: > Small fix. > > gcc/ > * config.gcc (icelake-client, icelake-server): New. > (icelake): Remove. > * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit. > (initial_ix86_arch_features): Ditto. >

Re: [PATCH] MIPS/GCC: Mark text contents as code or data

2018-03-14 Thread Paul Hua
I noticed that data-sym-pool.c fails on -O0 flags. -O0 output : -cut-- frob: .frame $17,8,$31 # vars= 0, regs= 1/0, args= 0, gp= 0 .mask 0x0002,0 .fmask 0x,0 addiu $sp,-8 sd $17,0($sp)

Re: [AArch64] Add SVE mul_highpart patterns

2018-03-14 Thread Richard Sandiford
Christophe Lyon writes: > On 8 February 2018 at 14:54, Richard Sandiford > wrote: >> Index: gcc/testsuite/gcc.target/aarch64/sve/mul_highpart_1_run.c >> === >> --- /dev/null 2018-02-08 11:17:10.862716283 + >> +++ gcc/testsuite/

[PATCH] Fix tree statistics with -fmem-report.

2018-03-14 Thread Martin Liška
Hi. Current code that tracks memory statistics wrongly decremented a counter based on t_kind, which is an enum value and thus a constant: - tree_node_counts[(int) t_kind]--; That's obviously a mistake. May I install the patch after reg tests&bootstrap? Thanks, Martin gcc/ChangeLog: 2018-

Re: [PATCH] Fix tree statistics with -fmem-report.

2018-03-14 Thread Richard Biener
On Wed, Mar 14, 2018 at 10:51 AM, Martin Liška wrote: > Hi. > > Current code that tracks memory statistics wrongly decremented a counter > based on t_kind, which is an enum value and thus a constant: > > - tree_node_counts[(int) t_kind]--; > > That's obviously a mistake. > > May I install the

[PATCH][ARM][PR82989] Fix unexpected use of NEON instructions for shifts

2018-03-14 Thread Sudakshina Das
Hi This patch fixes PR82989 so that we avoid NEON instructions when -mneon-for-64bits is not enabled. This is more of a short term fix for the real deeper problem of making and early decision of choosing or rejecting NEON instructions. There is now a new ticket PR84467 to deal with the longer

[PATCH] Revert assert in PRE

2018-03-14 Thread Richard Biener
Bootstrapped on x86_64-unknown-linux-gnu, applied. Richard. 2018-03-14 Richard Biener * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts that the value-set of ANTIC_IN doesn't grow. Revert * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with

Re: [PR84682] disregard address constraints on non-addresses

2018-03-14 Thread Bin.Cheng
On Wed, Mar 14, 2018 at 8:03 AM, Alexandre Oliva wrote: > On Mar 12, 2018, "Bin.Cheng" wrote: > >> internal compiler error: in aarch64_classify_address, at >> config/aarch64/aarch64.c:5678 >> 0xfe3c29 aarch64_classify_address >> /.../build/src/gcc/gcc/config/aarch64/aarch64.c:5677 >> 0xfe8be8

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

2018-03-14 Thread H.J. Lu
On Wed, Feb 21, 2018 at 3:02 AM, H.J. Lu wrote: > On Wed, Oct 18, 2017 at 5:25 PM, H.J. Lu wrote: >> config/plugins.m4 has >> >> if test "$plugins" = "yes"; then >> AC_SEARCH_LIBS([dlopen], [dl]) >> fi >> >> Plugin uses dlsym, but libasan.so only intercepts dlopen, not dlsym: >> >> [hjl@gn

RE: [patch][i386] Adding pconfig, wbnoinvd and wbinvd intrinsics

2018-03-14 Thread Makhotina, Olga
Hi, I have made changes to this patch. I attached a new version. 14.03. 2018 Olga Makhotina gcc/ * config/i386/sgxintrin.h (_enclv_u32): New intrinsic. (__enclv_bc, __enclv_cd, __enclv_generic): New definitions. (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves. gcc/testsu

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread Martin Liška
On 03/13/2018 04:23 PM, Jakub Jelinek wrote: > On Tue, Mar 13, 2018 at 04:19:21PM +0100, Martin Liška wrote: >>> Yes, see e.g. TARGET_LIBC_HAS_FUNCTION target hook, >>> where in particular linux_libc_has_function deals with various C libraries. >>> Of course, in this case you need another target ho

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread H.J. Lu
On Wed, Mar 14, 2018 at 5:54 AM, Martin Liška wrote: > On 03/13/2018 04:23 PM, Jakub Jelinek wrote: >> On Tue, Mar 13, 2018 at 04:19:21PM +0100, Martin Liška wrote: Yes, see e.g. TARGET_LIBC_HAS_FUNCTION target hook, where in particular linux_libc_has_function deals with various C librar

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread Martin Liška
On 03/14/2018 01:57 PM, H.J. Lu wrote: > On Wed, Mar 14, 2018 at 5:54 AM, Martin Liška wrote: >> On 03/13/2018 04:23 PM, Jakub Jelinek wrote: >>> On Tue, Mar 13, 2018 at 04:19:21PM +0100, Martin Liška wrote: > Yes, see e.g. TARGET_LIBC_HAS_FUNCTION target hook, > where in particular linux_

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread Jakub Jelinek
On Wed, Mar 14, 2018 at 01:54:39PM +0100, Martin Liška wrote: > --- a/gcc/builtins.c > +++ b/gcc/builtins.c > @@ -3651,13 +3651,24 @@ expand_builtin_memory_copy_args (tree dest, tree src, > tree len, >src_mem = get_memory_rtx (src, len); >set_mem_align (src_mem, src_align); > > + bool i

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread Jakub Jelinek
On Wed, Mar 14, 2018 at 02:08:07PM +0100, Martin Liška wrote: > > diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy.c > > b/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy.c > > index d82e2232d7b..91e1c87f83f 100644 > > --- a/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy

[PATCH] combine: Don't make log_links for pc_rtx (PR84780 #c10)

2018-03-14 Thread Segher Boessenkool
distribute_links tries to place a log_link for whatever the destination of the modified instruction is. It shouldn't do that when that dest is pc_rtx, which isn't actually a register. Committing to trunk. Segher 2018-03-14 Segher Boessenkool * combine.c (distribute_links): Don't m

[PATCH] rs6000: Fix sanitizer frame unwind on 32-bit ABIs

2018-03-14 Thread Segher Boessenkool
This fixes more than half of our testcase failures on BE. Committing. Segher 2018-03-14 Segher Boessenkool libsanitizer/ * sanitizer_common/sanitizer_stacktrace.cc (BufferedStackTrace::FastUnwindStack): Use the correct frame offset for PowerPC SYSV ABI. --- libsan

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-14 Thread Martin Liška
On 03/14/2018 02:07 PM, Jakub Jelinek wrote: > On Wed, Mar 14, 2018 at 01:54:39PM +0100, Martin Liška wrote: >> --- a/gcc/builtins.c >> +++ b/gcc/builtins.c >> @@ -3651,13 +3651,24 @@ expand_builtin_memory_copy_args (tree dest, tree >> src, tree len, >>src_mem = get_memory_rtx (src, len); >>

[committed] Fix ICE for missing header fix-it hints with overlarge #line directives (PR c/84852)

2018-03-14 Thread David Malcolm
PR c/84852 reports an ICE inside diagnostic_show_locus when printing a diagnostic for a source file with a #line >= 2^31: #line 77 int foo (void) { return strlen(""); } where we're attempting to print a fix-it hint at the top of the file and underline the "strlen" (two "line spans").

Re: [PATCH][AArch64][1/3] PR target/84164: Simplify subreg + redundant AND-immediate

2018-03-14 Thread Kyrill Tkachov
On 14/03/18 14:07, Jakub Jelinek wrote: On Fri, Mar 02, 2018 at 10:34:22AM -0700, Jeff Law wrote: 2018-02-12 Kyrylo Tkachov PR target/84164 * simplify-rtx.c (simplify_truncation): Simplify truncation of masking operation. * config/aarch64/aarch64.md (*aarch64_reg_3_neg_m

Re: [PATCH v2] Fix bogus strncpy source length warning on source bound by constant

2018-03-14 Thread Richard Biener
On Tue, Mar 13, 2018 at 7:22 PM, Siddhesh Poyarekar wrote: > Avoid issuing a bogus warning when the source of strncpy is bound by a > constant known to be less than the minimum size of the destination. > > Changes from v1: > > - Use range-info instead of the MIN_EXPR hack > - Get the minimum size

Re: [PATCH,rs6000] Add vec_permxor support.

2018-03-14 Thread Carl Love
Segher: I have addressed the following comments in the patch > > > > 2018-03-12  Carl Love   > > > > * config/rs6000/rs6000-c.c: Add macro definitions for > > ALTIVEC_BUILTIN_VEC_PERM. > > ALTIVEC_BUILTIN_VEC_PERMXOR. Fixed typo. > > > * config/rs6000/altivec.md: Add define_ins

[PATCH ] PR 844422 Fix FCTID, FCTIW with -mcpu=power7

2018-03-14 Thread Carl Love
GCC Maintainers: The following patch fixes an ICE when compiling the test case gcc -mcpu=power7 builtin-fctid-fctiw-runnable.c The GCC compiler now gives a message  "error: builtin function ‘__builtin_fctiw’ requires the ‘-mpower8-vector’ option"  and exits without generating an interna

[PATCH, rs6000] PR 84422 fix sse2-pmuludq-1.c with -mcpu=power7

2018-03-14 Thread Carl Love
GCC Maintainers: The following patch fixes an ICE when compiling the test case   gcc -mcpu=power7 sse2-pmuludq-1.c The GCC compiler now gives a message  "error: builtin function ‘__builtin_altivec_vmuleuw’ requires the ‘-mpower8-vector’ option"  and exits without generating an internal er

C++ PATCH to fix an ICE on invalid with OVERLOADs (PR c++/84854)

2018-03-14 Thread Marek Polacek
cxx_constant_value doesn't understand template codes, and neither it understands OVERLOADs, so if we pass an OVERLOAD to it, we crash. Here instantiate_non_dependent_expr got an OVERLOAD, but since it calls is_nondependent_constant_expression which checks type_unknown_p, it left the expression as

[PATCH] Document some arch-specific operand modifiers

2018-03-14 Thread Borislav Petkov
Hi, here's an attempt to document some of the inline asm operand modifiers which make sense and which get used so that people can find what they mean in the docs. This is my first gcc patch so there might be clumsiness ahead. :) Thanks, Boris. gcc/Changelog: 2018-03-14 Borislav Petkov

Re: [PATCH,rs6000] Add vec_permxor support.

2018-03-14 Thread Segher Boessenkool
Hi! On Wed, Mar 14, 2018 at 08:17:42AM -0700, Carl Love wrote: > 2018-03-14 Carl Love > > * config/rs6000/rs6000-c.c: Add macro definitions for > ALTIVEC_BUILTIN_VEC_PERMXOR. > * config/rs6000/rs6000.h: Add #define for vec_permxor builtin. > * config/rs6000/rs6000-built

[PATCH] Add test-case (PR ipa/84805).

2018-03-14 Thread Martin Liška
Hi. This is a new test-case isolated from libreoffice. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. I'm going to install it. Martin gcc/testsuite/ChangeLog: 2018-03-14 Martin Liska PR ipa/8480 * g++.dg/lto/pr84805_0.C: New test. * g++.d

Re: [PATCH][AArch64][1/3] PR target/84164: Simplify subreg + redundant AND-immediate

2018-03-14 Thread Jakub Jelinek
On Fri, Mar 02, 2018 at 10:34:22AM -0700, Jeff Law wrote: > >>> 2018-02-12  Kyrylo Tkachov  > >>> > >>>     PR target/84164 > >>>     * simplify-rtx.c (simplify_truncation): Simplify truncation of > >>> masking > >>>     operation. > >>>     * config/aarch64/aarch64.md (*aarch64_reg_3_neg_mask2):

[PATCH][AARCH64] PR target/84521 Fix frame pointer corruption with -fomit-frame-pointer with __builtin_setjmp

2018-03-14 Thread Sudakshina Das
Hi This patch is another partial fix for PR 84521. This is adding a definition to one of the target hooks used in the SJLJ implemetation so that AArch64 defines the hard_frame_pointer_rtx as the TARGET_BUILTIN_SETJMP_FRAME_VALUE. As pointed out by Wilco there is still a lot more work to be do

Re: C++ PATCH to fix an ICE on invalid with OVERLOADs (PR c++/84854)

2018-03-14 Thread Jason Merrill
On Wed, Mar 14, 2018 at 11:59 AM, Marek Polacek wrote: > cxx_constant_value doesn't understand template codes, and neither it > understands OVERLOADs, so if we pass an OVERLOAD to it, we crash. Here > instantiate_non_dependent_expr got an OVERLOAD, but since it calls > is_nondependent_constant_ex

Re: [x86,avx] Fix __builtin_cpu_supports for icelake and cannonlake isa

2018-03-14 Thread Kirill Yukhin
Hello Julia! > On 14 Mar 2018, at 10:48, Koval, Julia wrote: > > Gentle ping. Your patch is OK for main trunk. — Thanks, K >> -Original Message- >> From: Koval, Julia >> Sent: Monday, February 12, 2018 10:57 AM >> To: Kirill Yukhin >> Cc: 'GCC Patches' >> Subject: RE: [x86,avx] Fi

C++ PATCH for c++/83916, C++17 ICE with template template parameters

2018-03-14 Thread Jason Merrill
In the wg21.link/P0522 change to template template parameter matching, we ran into trouble with this testcase: when we try to form TTC, we need to convert TA to TC, and try to tsubst TC to produce the real desired type. But trying to look up TC in the args for TTC fails, and indeed makes no sense.

[PATCH v2, rs6000] Remove unused (and incorrect) code for internal store and load operations

2018-03-14 Thread Kelvin Nilsen
Thank you for feedback and discussion regarding my first draft of this patch with Segher Boessenkool and Bill Schmidt. This revision of the patch differs from the first in the following regards: 1. I have also removed the vector_altivec_load_ and vectore_altivec_store_ expansions from vector.md.

Re: RFA (make_dispatcher_decl): PATCH for c++/83911, ICE with multiversioned constructor

2018-03-14 Thread Jason Merrill
Ping On Fri, Mar 2, 2018 at 1:23 PM, Jason Merrill wrote: > As I mentioned in the PR, the problem here is that we're replacing a > constructor with a dispatcher function which doesn't look much like a > constructor. This patch adjusts make_dispatcher_decl to make it look > more like the function

Re: [PATCH] Add test-case (PR ipa/84805).

2018-03-14 Thread Eric Botcazou
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Please make sure to test it on more platforms (see PR ipa/83983 for details). -- Eric Botcazou

Re: [PATCH, rs6000] PR 84422 fix sse2-pmuludq-1.c with -mcpu=power7

2018-03-14 Thread Segher Boessenkool
Hi Carl, On Wed, Mar 14, 2018 at 08:32:54AM -0700, Carl Love wrote: > 2018-03-13 Carl Love > > PR 84422 - ICE on various builtin test functions when compiled with > -mcpu=power7. This should be _exactly_ PR target/84422 (one such line per PR, and no blank line after it)

Enable string_view assertions

2018-03-14 Thread François Dumont
Hi     Following PR 78420 patch I realized that we can use similar technique to have assertions in string_view implementations.     I also rename testsuite files expected to XFAIL as they should have a trailing '_neg'. It fixes 4 XPASS when run in debug mode     Note that I also try to use

[PATCH, rs6000] Finish implementation of __builtin_atlivec_lvx_v1ti

2018-03-14 Thread Kelvin Nilsen
During code review, it was discovered that the implementation of __builtin_altivec_lvx_v1ti is not complete. The constant ALTIVEC_BUILTINLVX_V1TI is introduced and is bound to the function __builtin_altivec_lvx_v1ti. However, this function's implementation is incomplete because there is no call t

[PATCH] Fix emit_conditional_move (PR target/84860)

2018-03-14 Thread Jakub Jelinek
Hi! prepare_cmp_insn in some cases changes both the passed in comparison and the comparison mode, e.g. by promoting the arguments from SFmode to DFmode etc. In emit_conditional_move we call this in a loop, for (pass = 0; pass < 2; pass++) and in each case construct comparison arguments as well a

[C++ PATCH] Fix up -Wdeprecated (PR c++/84222)

2018-03-14 Thread Jakub Jelinek
Hi! As the following testcase shows, if we have a deprecated class, we warn about any uses, including e.g. arguments of methods of that class (how can one e.g. declare or define a copy ctor without warnings?). The following patch changes it, so that we don't warn about deprecated uses in methods

[C PATCH] Reject shifts of float vectors by int count (PR c/84853)

2018-03-14 Thread Jakub Jelinek
Hi! The change for better warnings on vector shifts unfortunately started accepting even shifts of floating point vectors by int shift count, which is something that shouldn't be supported and ICEs later on. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-

[C++ PATCH] Fix PLACEHOLDER_EXPR handling (PR c++/79937, PR c++/82410)

2018-03-14 Thread Jakub Jelinek
Hi! The following patch is an attempt to fix PLACEHOLDER_EXPR handling. As e.g. struct Y { static Y bar (Y y) { return y; } int i; int n = bar (Y{2,i}).m + bar {Y{2,i,i}).n; int m = i; }; is rejected - one can't use incomplete ctors which would need NSDMIs until the class is defined, I bel

Re: Enable string_view assertions

2018-03-14 Thread Jonathan Wakely
(Resending from a different account, sorry for the duplicate). On 14/03/18 22:12 +0100, François Dumont wrote: > constexpr const _CharT& > operator[](size_type __pos) const noexcept > { >- // TODO: Assert to restore in a way compatible with the constexpr. >- // __glibcx

[RFC Patch], PowerPC memory support pre-gcc9, patch #1

2018-03-14 Thread Michael Meissner
I am starting to work on cleaning up the memory addressing support in the GCC 9 time frame. At the moment, I am working on upgrading the infrastructure to allow in the future to prevent splitting memory on 64-bit LE systems too early, rework the fusion support, and provide a pathway for future pro

Re: PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-14 Thread Jonathan Wakely
Here's a very different patch. This gets rid of the __ptr_rel_ops and just puts the special handling for pointers directly in the std::less<_Tp*> etc. specializations. Then std::less uses std::less for some pointer type P*. I've also added a ton of ugly metaprogramming to detect the "if the call op

Re: Enable string_view assertions

2018-03-14 Thread Jonathan Wakely
On 14 March 2018 at 22:52, Jonathan Wakely wrote: > (Resending from a different account, sorry for the duplicate). > > On 14/03/18 22:12 +0100, François Dumont wrote: >> constexpr const _CharT& >> operator[](size_type __pos) const noexcept >> { >>- // TODO: Assert to restore

[committed] hppa: Fix handling of secondary reloads for floating-point loads and stores

2018-03-14 Thread John David Anglin
In rare situations, pa_emit_move_sequence needs to handle a paradoxical SUBREG in a floating-point load or store.  There is existing code to adjust the operand's address but we fail to emit the reload if we don't need to load the address to a register.  We just fall through pa_emit_move_sequenc

Re: Enable string_view assertions

2018-03-14 Thread Jonathan Wakely
On 14 March 2018 at 23:27, Jonathan Wakely wrote: > Here's one way to generalize this idea. We could potentially replace > most of the lightweight __glibcxx_assert checks with this, to get > zero-overhead static checking at compile-time whenever possible (even > in constexpr functions) and have opt

Re: [C PATCH] Reject shifts of float vectors by int count (PR c/84853)

2018-03-14 Thread Joseph Myers
On Wed, 14 Mar 2018, Jakub Jelinek wrote: > Hi! > > The change for better warnings on vector shifts unfortunately started > accepting even shifts of floating point vectors by int shift count, which is > something that shouldn't be supported and ICEs later on. > > Fixed thusly, bootstrapped/regte

Re: [C++ PATCH] Fix up -Wdeprecated (PR c++/84222)

2018-03-14 Thread Jason Merrill
On Wed, Mar 14, 2018 at 6:26 PM, Jakub Jelinek wrote: > As the following testcase shows, if we have a deprecated class, we warn > about any uses, including e.g. arguments of methods of that class (how can > one e.g. declare or define a copy ctor without warnings?). > > The following patch changes

Re: [C++ PATCH] Fix PLACEHOLDER_EXPR handling (PR c++/79937, PR c++/82410)

2018-03-14 Thread Jason Merrill
On Wed, Mar 14, 2018 at 6:33 PM, Jakub Jelinek wrote: > The following patch is an attempt to fix PLACEHOLDER_EXPR handling. > As e.g. > struct Y > { > static Y bar (Y y) { return y; } > int i; > int n = bar (Y{2,i}).m + bar {Y{2,i,i}).n; > int m = i; > }; > is rejected - one can't use inco

[PATCH] PR fortran/69395 -- don't exceed max allowed array dimensions

2018-03-14 Thread Steve Kargl
The attachedi patch detects situations where the sum of an array's rank and corank exceeds the maximum allowed by the Standard. Regression tested on x86_64-*-freebsd. 2018-03-14 Steven G. Kargl PR fortran/69395 * decl.c (merge_array_spec): Limit the merging to maximum allowed

Re: [committed] Fix ICE for missing header fix-it hints with overlarge #line directives (PR c/84852)

2018-03-14 Thread Paul Hua
Hi: The fixits-pr84852-1.c fails on mips64el target. FAIL: gcc.dg/fixits-pr84852-1.c (test for excess errors) FAIL: gcc.dg/fixits-pr84852-1.c dg-regexp 25 not found: ".*fixits-pr84852.c:-812156810:25:" see this patch: diff --git a/gcc/testsuite/gcc.dg/fixits-pr84852-1.c b/gcc/testsuite/gcc.dg/f

Re: C++ PATCH for c++/81236, missed 'this' capture with template-id in generic lambda

2018-03-14 Thread Jason Merrill
On Tue, Aug 29, 2017 at 5:37 PM, Jason Merrill wrote: > We could approach this by extending that change to all generic > lambdas, and that might be appropriate for GCC 7, but it seems to me > that this approach will just mean any problems with doing all the > normal processing in a template will r

C++ PATCH for c++/84801, ICE with unexpanded pack in lambda

2018-03-14 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. commit c977f3b7668e49eb8f8fd3fdabb6cc7a47e37adc Author: Jason Merrill Date: Wed Mar 14 23:29:39 2018 -0400 PR c++/84801 - ICE with unexpanded pack in lambda. * pt.c (check_for_bare_parameter_packs): Don't return early f

C++ PATCH for c++/84820, no error for invalid qualified-id

2018-03-14 Thread Jason Merrill
The problem here was that although cp_parser_declarator returned cp_error_declarator, we then wrapped it in another declarator, hiding the problem. Tested x86_64-pc-linux-gnu, applying to trunk. commit 44b23ac745e9f249ff3971fcb4021facbbf8741c Author: Jason Merrill Date: Thu Mar 15 00:14:04 2018

Re: [PATCH v2] Fix bogus strncpy source length warning on source bound by constant

2018-03-14 Thread Siddhesh Poyarekar
On Wednesday 14 March 2018 08:40 PM, Richard Biener wrote: > Instead of building a tree from max you should use > > if (wi::to_widest (max) < wi::to_widest (wi::to_wide (dstsize))) > return; > > given compute_objsize is somewhat confused about the type it returns > a widest_int compare