[Bug tree-optimization/78692] New: [7 Regression] ICE (segfault)

2016-12-05 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78692 Bug ID: 78692 Summary: [7 Regression] ICE (segfault) Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization

[Bug middle-end/78642] [7 regression] invalid rtl sharing found in the insn

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/78642] [7 regression] invalid rtl sharing found in the insn

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 --- Comment #15 from Eric Botcazou --- Author: ebotcazou Date: Tue Dec 6 07:03:04 2016 New Revision: 243282 URL: https://gcc.gnu.org/viewcvs?rev=243282=gcc=rev Log: PR middle-end/78642 * emit-rtl.c (verify_rtx_sharing) : Relax

[Bug middle-end/78691] [7 Regression] ICE compiling Linux boot code

2016-12-05 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78691 Markus Trippelsdorf changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[patch] libiberty/78584

2016-12-05 Thread DJ Delorie
While the root solution for the bug is "don't do that", we should at least try to detect the obviously wrong case more gracefully. Committed. * argv.c (expandargv): Check for directories passed as @-files. Index: argv.c ===

[PING][PATCH] [AArch64] Fix PR71112

2016-12-05 Thread Hurugalawadi, Naveen
Hi, Please consider this as a personal reminder to review the patch at following link and let me know your comments on the same. https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02305.html Thanks, Naveen

[PING][PATCH] [AArch64] Fix PR78382

2016-12-05 Thread Hurugalawadi, Naveen
Hi, Please consider this as a personal reminder to review the patch at following link and let me know your comments on the same. https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02078.html Thanks, Naveen

[PING] [PATCH] [AArch64] Fix PR71727

2016-12-05 Thread Hurugalawadi, Naveen
Hi, Please consider this as a personal reminder to review the patch at following link and let me know your comments on the same. https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00697.html Thanks, Naveen

[Bug c/78691] ICE compiling Linux PPC boot code

2016-12-05 Thread g...@d-silva.org
u/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --with-linker-hash-style=both --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/workspace/x-tools/x86_64-unknown-linux-gnu/sysroot --enable-long-long Thread model: posix gcc version 7.

[Bug c/78691] ICE compiling Linux PPC boot code

2016-12-05 Thread g...@d-silva.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78691 --- Comment #1 from Alastair D'Silva --- Created attachment 40262 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40262=edit minimal testcase to reproduce the ICE for x86

Re: [PATCH v2,rs6000] Add built-in function support for Power9 byte instructions.

2016-12-05 Thread David Edelsohn
Kelvin, This version shows a lot of improvement. (cmprb): New expansion. (*cmprb): New insn. (*setb): New insn. (cmprb2): New expansion. (*cmprb2): New insn. (cmpeqb): New expansion. (*cmpeqb): New insn. The named and un-named patterns should have different names. Technically, the names don't

Re: [PR middle-end/78566] Fix uninit regressions caused by previous -Wmaybe-uninit change

2016-12-05 Thread Jeff Law
On 11/29/2016 09:33 AM, Aldy Hernandez wrote: This fixes the gcc.dg/uninit-pred-6* failures I seem to have caused on some non x86 platforms. Sorry for the delay. The problem is that my fix for PR61409 had the logic backwards. I was proving that all the uses of a PHI are invalidated by any one

Re: Ping 4 [PATCH] enhance buffer overflow warnings (and c/53562)

2016-12-05 Thread Martin Sebor
I lost track of this patch among all the others but I don't see a reply to it in the archives. https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02173.html The only controversial part about this one that I recall was whether object size type 0 or 1 should be used for raw memory functions like

[PATCH v2,rs6000] Add built-in function support for Power9 byte instructions.

2016-12-05 Thread Kelvin Nilsen
This patch adds built-in function support for the new setb, cmprb, and cmpeqb Power9 instructions. This second version of the patch differs from the first in the following ways: 1. Removed the UNSPEC_SETB new unspec value. Rewrote these patterns to describe semantics in terms of primitive

[Bug c/78691] New: ICE compiling Linux PPC boot code

2016-12-05 Thread g...@d-silva.org
-optspace --enable-plugin --disable-nls --disable-multilib --with-local-prefix=/workspace/x-tools/powerpc64-unknown-linux-gnu/sysroot --enable-long-long --disable-multilib Thread model: posix gcc version 7.0.0 20161205 (experimental) (crosstool-NG crosstool-ng-1.22.0-201-g11cb2dd) Git

Re: [PATCH] detect null sprintf pointers (PR 78519)

2016-12-05 Thread Martin Sebor
On 12/05/2016 11:21 AM, Jeff Law wrote: On 12/04/2016 04:55 PM, Martin Sebor wrote: Bug 78519 points out that while the -Wformat warning flags a small subset of sprintf calls with a null pointer argument to a %s directive (those where the pointer is a constant) it misses the much bigger set

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-05 Thread Martin Sebor
On 12/05/2016 01:26 PM, Jakub Jelinek wrote: Hi! On Thu, Dec 01, 2016 at 07:31:18PM -0700, Martin Sebor wrote: +static bool +adjust_range_for_overflow (tree dirtype, tree *argmin, tree *argmax) +{ + if (TYPE_UNSIGNED (dirtype)) +{ + *argmin = dirmin; + *argmax = dirmax; +} +

Re: [RFC] Assert DECL_ABSTRACT_ORIGIN is different from the decl itself

2016-12-05 Thread Jeff Law
On 12/01/2016 09:10 AM, Martin Jambor wrote: Hello, On Wed, Nov 30, 2016 at 02:09:19PM +0100, Martin Jambor wrote: On Tue, Nov 29, 2016 at 10:17:02AM -0700, Jeff Law wrote: ... So it seems that rather than an assert that we should just not walk down a self-referencing DECL_ABSTRACT_ORIGIN.

[patch, fortran] [F03] Spurious "requires DTIO" reported against namelist statement

2016-12-05 Thread Jerry DeLisle
The attached patch removes one error message and updates several test cases. I split alloc_comp_constraint_1.f90 into two cases with the addition of alloc_comp_constraint_7.f90. One gets different error messages depending on which standard is invoked, f95 or f2003. I will do an appropriate

[Bug fortran/78659] [F03] Spurious "requires DTIO" reported against namelist statement

2016-12-05 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78659 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org ---

[PATCH], Committed, PR target/78688, fix PowerPC bootstrap issue

2016-12-05 Thread Michael Meissner
A recent change to enable signed vs. unsigned comparisons to be flagged as an error broke the PowerPC bootstrap. The issue was with the FUNCTION_VALUE_REGNO_P macro. I changed it and the FUNCTION_ARG_REGNO_P to both use IN_RANGE instead of doing a subtraction of the first value and comparing it

[Bug target/78688] PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 Michael Meissner changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/78688] PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 --- Comment #2 from Michael Meissner --- Author: meissner Date: Tue Dec 6 00:58:40 2016 New Revision: 243278 URL: https://gcc.gnu.org/viewcvs?rev=243278=gcc=rev Log: 2016-12-05 Michael Meissner PR

[Bug libstdc++/78677] __gthread_key_create assumed not to fail in eh_globals.cc

2016-12-05 Thread chrisj at rtems dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78677 --- Comment #2 from Chris Johns --- (In reply to Jonathan Wakely from comment #1) > (In reply to Chris Johns from comment #0) > > Some operating system, for example RTEMS, may fail to create a POSIX key if > > not configured with enough

[Bug c++/78690] New: [7 Regression] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:552

2016-12-05 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78690 Bug ID: 78690 Summary: [7 Regression] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:552 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/78684] [7 Regression] ICE in create_intersect_range_checks_index, at tree-vect-loop-manip.c:2074

2016-12-05 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78684 --- Comment #1 from Matthias Klose --- a test case without a processor specific option. $ cat RapMapSAIndex.ii class a { public: a(long); void operator<<=(long) { long b; for (unsigned long c; c; c--) d[c + b] = d[c]; } a

[Aarch64][PATCH] Fix gcc.dg/zero_bits_compound-2.c for aarch64

2016-12-05 Thread Michael Collison
This patches fixes a regression in gcc.dg/zero_bits_compound-2.c. A recent patch (https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02392.html) to the aarch64 backend improved generation for 'and' instructions with constants. The patch changed the number of 'and' instruction generated at the

[Bug target/78688] PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 Michael Meissner changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug middle-end/78689] New: [7 Regression] ICE (segfault)

2016-12-05 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78689 Bug ID: 78689 Summary: [7 Regression] ICE (segfault) Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end

[Bug target/78688] PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 --- Comment #1 from Michael Meissner --- Created attachment 40260 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40260=edit Proposed patch to fix the problem

[Bug fortran/78659] [F03] Spurious "requires DTIO" reported against namelist statement

2016-12-05 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78659 --- Comment #4 from Jerry DeLisle --- I have the ICE resolved, but also note that the Fortran 95 standard has the constraint on namelist statements and F2003 does not. Constraint - namelist-group-object shall not be an array dummy argument with

Possible bug with switch when optimization is turned on.

2016-12-05 Thread luke B
Hi The following code seems to be correctly executed when compiled with GCC 4.4.7 and LLVM 6.1. It does not correctly compile with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4). The following is what I have reduced the problem to: #include #include #define GENERAL 1 #define

[Bug middle-end/17308] nonnull attribute not as useful as it could

2016-12-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17308 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #15 from Martin Sebor

[Bug c/78673] sprintf missing attribute nonnull on destination argument

2016-12-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78673 Martin Sebor changed: What|Removed |Added Keywords||patch See Also|

[PATCH] add missing attribute nonnull to stdio functions (PR 78673 and 17308)

2016-12-05 Thread Martin Sebor
The new -Wformat-length warning pass detects and diagnoses non- constant null format strings. This is in addition to (but not in conflict with) -Wformat which is limited to detecting only null constants. A recently posted patch of mine also adds the detection of null pointer arguments to the %s

Re: [patch] Fix PR middle-end/78642

2016-12-05 Thread Jeff Law
On 12/05/2016 03:46 PM, Eric Botcazou wrote: Hi, this fixes the regressions introduced on SPARC by the newly reenabled RTL sharing verification. They come from the special treatment for CLOBBERs: case CLOBBER: /* Share clobbers of hard registers (like cc0), but do not share pseudo reg

Re: [tree-tailcall] Check if function returns it's argument

2016-12-05 Thread Jeff Law
On 12/02/2016 01:33 AM, Richard Biener wrote: The LHS on the assignment makes it easier to identify when a tail call is possible. It's not needed for correctness. Not having the LHS on the assignment just means we won't get an optimized tail call. Under what circumstances would the LHS

[patch] Fix PR middle-end/78642

2016-12-05 Thread Eric Botcazou
Hi, this fixes the regressions introduced on SPARC by the newly reenabled RTL sharing verification. They come from the special treatment for CLOBBERs: case CLOBBER: /* Share clobbers of hard registers (like cc0), but do not share pseudo reg clobbers or clobbers of hard

[Bug target/78633] [7 Regression] [SH] libgcc/fp-bit.c:944:1: error: invalid rtl sharing found in the insn

2016-12-05 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78633 --- Comment #10 from Kazumoto Kojima --- Ah, don't mind. Your patch accidentally hides this PR. Now the SH build failure comes back on trunk :-)

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-05 Thread Ian Lance Taylor
On Mon, Dec 5, 2016 at 1:29 PM, Lynn A. Boger wrote: > I think you mean https://github.com/golang/go/issues/18200. Yes, thanks, I meant to write https://golang.org/issue/18200. Ian > On 12/05/2016 02:52 PM, Ian Lance Taylor wrote: >> >> On Sun, Sep 4, 2016 at 1:10

[Bug target/71977] powerpc64: Use VSR when operating on float and integer

2016-12-05 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71977 --- Comment #2 from Peter Bergner --- (In reply to Michael Meissner from comment #1) > Note in terms of the code in general, you have to make sure that the float > value is converted to vector form before you do AND/OR/etc. on it. This is >

[Bug middle-end/49774] [meta-bug] restrict qualification aliasing issues

2016-12-05 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49774 Bug 49774 depends on bug 48390, which changed state. Bug 48390 Summary: Multiple setting to restricted pointer variable not optimized away https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48390 What|Removed |Added

[Bug middle-end/48390] Multiple setting to restricted pointer variable not optimized away

2016-12-05 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48390 Jeffrey A. Law changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug target/78688] PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 Michael Meissner changed: What|Removed |Added Target||powerpc64le-gnu-linux

[Bug target/78688] New: PowerPC fails bootstrap

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78688 Bug ID: 78688 Summary: PowerPC fails bootstrap Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee:

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-05 Thread Eric Botcazou
> According to https://golang.org/cl/18200, this change broke Go on PPC64le. Any other platform where this also happened? > I haven't investigated myself and I don't know why. Go does not use > stack trampolines for function closures. It does use function > closures, but they are built on the

Re: Bug in gcc.c for_each_path() (leads to invalid crt0.o selection)?

2016-12-05 Thread Joseph Myers
On Mon, 5 Dec 2016, Sebastian Huber wrote: > If we assume that the command line order determines the search order, then its > not clear why for_each_path() first iterates for all paths with the multilib > postfix and then without. Shouldn't it iterate over all paths and check > with/without

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 Bill Schmidt changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[PATCH] Fix PR78646

2016-12-05 Thread Bill Schmidt
Hi, PR78646 identifies a case where the base expression for a strength-reduced memory reference gets a type of insufficient alignment. This pointed out the fact that we should use the type of the candidate expression for the new base expression in all cases. Patch by Stefan M. Freudenberger.

[Bug tree-optimization/78646] incorrect result type for pointer addition in slsr

2016-12-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78646 --- Comment #8 from Bill Schmidt --- Author: wschmidt Date: Mon Dec 5 21:48:27 2016 New Revision: 243272 URL: https://gcc.gnu.org/viewcvs?rev=243272=gcc=rev Log: 2016-12-05 Bill Schmidt Stefan

[Bug fortran/78226] Fill out location information everywhere

2016-12-05 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78226 --- Comment #12 from Thomas Koenig --- Hi Andre, the patch at https://gcc.gnu.org/ml/fortran/2016-12/msg00048.html is OK (or, at your choice, obvious and simple). I don't have access to my e-mail at the moment, so I cannot reply to the list

Re: [Patch][i386] PR 70118: Fix ubsan warning on SSE2 loadl_epi64 and storel_epi64

2016-12-05 Thread Allan Sandfeld Jensen
Trying again, this time with changelog. gcc/ 2016-11-30 Allan Sandfeld Jensen PR target/70118 * gcc/config/i386/mmintrin.h (__m64_u): New type * gcc/config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64): Make the allowed unaligned

[Bug target/71977] powerpc64: Use VSR when operating on float and integer

2016-12-05 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71977 --- Comment #1 from Michael Meissner --- Unfortunately, the code gets even worse if you use -mcpu=power9: .L.mask_float: stfs 1,-16(1) lwz 9,-16(1) and 4,4,9 stw 4,-16(1) lfs 1,-16(1) blr I.e.

[PATCH] Added noexcept on constructors

2016-12-05 Thread Aditya Kumar
Thanks for the feedback. Updated patch is below. The noexcept on definition and the declaration of constructors _Sp_locker do not match. ChangeLog 2016-12-05 Aditya Kumar * src/c++11/shared_ptr.cc (_Sp_locker::_Sp_locker(const void* p)): Added noexcept on

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-05 Thread Lynn A. Boger
I think you mean https://github.com/golang/go/issues/18200. - Lynn On 12/05/2016 02:52 PM, Ian Lance Taylor wrote: On Sun, Sep 4, 2016 at 1:10 PM, Eric Botcazou wrote: 2016-07-04 Eric Botcazou PR ada/37139 PR ada/67205

[PATCH] Fix ICE due to IPA-VRP (PR tree-optimization/78681)

2016-12-05 Thread Jakub Jelinek
Hi! As shown on the testcase, with K definitions and fn prototypes with promoted types, we can end up computing caller's value ranges in wider type than the parameter actually has in the function. The problem with that is that wide_int_storage::from can actually wrap around, so either as in the

[Bug c++/78635] [6/7 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:4989

2016-12-05 Thread nathan at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78635 --- Comment #10 from Nathan Sidwell --- On 12/05/2016 03:44 PM, jakub at gcc dot gnu.org wrote: > I thought that such constructs are widely used though, I believe e.g. glibc > used arrays of structs with flexible array members in several

[Bug c++/68489] arrays of flexible array members are silently accepted

2016-12-05 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68489 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-05 Thread Ian Lance Taylor
On Sun, Sep 4, 2016 at 1:10 PM, Eric Botcazou wrote: > > 2016-07-04 Eric Botcazou > > PR ada/37139 > PR ada/67205 > * common.opt (-ftrampolines): New option. > * doc/invoke.texi (Code Gen Options): Document it. >

Re: [PATCH, rs6000] Fold vector addition built-ins in GIMPLE

2016-12-05 Thread Bill Schmidt
What's your target triple? > On Dec 4, 2016, at 6:36 AM, Andreas Schwab wrote: > > On Nov 01 2016, Bill Schmidt wrote: > >> * gcc.target/powerpc/fold-vec-add-7.c: New. > > spawn -ignore SIGHUP /daten/gcc/gcc-20161203/Build/gcc/xgcc >

[Bug c++/78635] [6/7 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:4989

2016-12-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78635 --- Comment #9 from Jakub Jelinek --- (In reply to Nathan Sidwell from comment #8) > The fix for both bugs is the same -- reject creation of arrays of trailing > array elements. We used to reject initializers for such arrays, then we > silently

[Bug target/78642] [7 regression] ICE: invalid rtl sharing found in the insn on sparc

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 Eric Botcazou changed: What|Removed |Added Attachment #40258|0 |1 is obsolete|

[Bug target/78642] [7 regression] ICE: invalid rtl sharing found in the insn on sparc

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 --- Comment #13 from Eric Botcazou --- Created attachment 40258 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40258=edit Tentative fix

[Bug c++/78635] [6/7 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:4989

2016-12-05 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78635 --- Comment #8 from Nathan Sidwell --- The fix for both bugs is the same -- reject creation of arrays of trailing array elements. We used to reject initializers for such arrays, then we silently accepted them (generating wrong code), now we

C++ PATCH for c++/78647 (ICE-on-invalid with attribute_fallthrough_p)

2016-12-05 Thread Marek Polacek
We were crashing on this invalid test because cp_parser_std_attribute_spec_seq in cp_parser_statement returned error_mark_node, but the subsequent attribute_fallthrough_p wasn't prepared for that. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-12-05 Marek Polacek

[Bug target/78642] [7 regression] ICE: invalid rtl sharing found in the insn on sparc

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 --- Comment #12 from Eric Botcazou --- > But verify_rtx_sharing also has: > > case CLOBBER: > /* Share clobbers of hard registers (like cc0), but do not share > pseudo reg > clobbers or clobbers of hard registers that

[Bug target/78642] [7 regression] ICE: invalid rtl sharing found in the insn on sparc

2016-12-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78642 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug c++/78635] [6/7 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:4989

2016-12-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78635 --- Comment #7 from Jakub Jelinek --- But this one has been marked as regression, the other PR is not. So, either it needs to be turned into a regression, or this one can't be a dup.

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-05 Thread Jakub Jelinek
Hi! On Thu, Dec 01, 2016 at 07:31:18PM -0700, Martin Sebor wrote: > +static bool > +adjust_range_for_overflow (tree dirtype, tree *argmin, tree *argmax) > +{ > + if (TYPE_UNSIGNED (dirtype)) > +{ > + *argmin = dirmin; > + *argmax = dirmax; > +} > + else > +{ > +

[Bug rtl-optimization/78561] Constant pool size (offset) can become stale where constant pool entires become unused

2016-12-05 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78561 --- Comment #15 from James Greenhalgh --- (In reply to Segher Boessenkool from comment #14) > I used trunk. --disable-bootstrap fails the same, just much faster ;-) > > Maybe the binutils etc. version matters? Do you have a "modern" GCC on

[Bug fortran/78682] [Coarray] [OOP] ICE calling (locally) a TBP of a remote CAF derived type

2016-12-05 Thread stefano.zaghi at cnr dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78682 --- Comment #4 from Stefano Zaghi --- (In reply to janus from comment #3) > I see the ICE with 5.4.1 and 6.2.0, but I can confirm that it is gone on > current trunk. > > For which reason do you think the code is invalid? I have not yet studied

[Bug rtl-optimization/78561] Constant pool size (offset) can become stale where constant pool entires become unused

2016-12-05 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78561 --- Comment #14 from Segher Boessenkool --- I used trunk. --disable-bootstrap fails the same, just much faster ;-) Maybe the binutils etc. version matters?

[Bug c++/78635] [6/7 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:4989

2016-12-05 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78635 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/68489] arrays of flexible array members are silently accepted

2016-12-05 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68489 Nathan Sidwell changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment #2

[Patch, fortran] PR77903 - [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces

2016-12-05 Thread Paul Richard Thomas
Dear All, It took me an excessively long time to realise that processing the typespec for an explicitly typed module procedure was wiping out the interface symbol and so preventing the comparison of characteristics between the interface and the separate module procedure. Transferring the module

Re: [C++] trailing array hack

2016-12-05 Thread Martin Sebor
On 12/05/2016 11:09 AM, Nathan Sidwell wrote: Jason, Martin. looking at pr78635, I find it related to Martin's patch of 15-12-2015 dealing with flexible array members. Martin's patch makes the following ill-formed: struct Base {int m; char ary[];}; // ends in flexible array - OK struct

[Bug rtl-optimization/78561] Constant pool size (offset) can become stale where constant pool entires become unused

2016-12-05 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78561 --- Comment #13 from James Greenhalgh --- (In reply to Segher Boessenkool from comment #12) > It still happens here, also on gcc110. Note you need --disable-werror, > to avoid another bootstrap error. > > Did you perchance use

[Bug fortran/77903] [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces

2016-12-05 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77903 Paul Thomas changed: What|Removed |Added Attachment #40256|0 |1 is obsolete|

[Bug fortran/77903] [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces

2016-12-05 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77903 Paul Thomas changed: What|Removed |Added Attachment #40237|0 |1 is obsolete|

[Bug c++/78621] lambda mangling not ABI compliant

2016-12-05 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78621 --- Comment #1 from Nathan Sidwell --- Created attachment 40255 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40255=edit squangling too This testcase shows problems with the mangling of auto parms themeselves, and with subsequent fallout

[Bug rtl-optimization/78561] Constant pool size (offset) can become stale where constant pool entires become unused

2016-12-05 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78561 --- Comment #12 from Segher Boessenkool --- It still happens here, also on gcc110. Note you need --disable-werror, to avoid another bootstrap error. Did you perchance use --disable-bootstrap?

[Bug tree-optimization/78687] New: inefficient code generated for eggs.variant

2016-12-05 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78687 Bug ID: 78687 Summary: inefficient code generated for eggs.variant Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug fortran/65173] ICE while compiling wrong code

2016-12-05 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65173 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org ---

[Bug target/72742] [7 Regression] ICE in extract_insn, at recog.c:2309 (error: unrecognizable insn) w/ -Os -mlra

2016-12-05 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72742 Aldy Hernandez changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/78647] ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.c:664)

2016-12-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78647 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Martin Sebor
On 12/05/2016 11:25 AM, Jeff Law wrote: On 12/05/2016 08:50 AM, Martin Sebor wrote: On 12/02/2016 08:52 AM, Martin Sebor wrote: On 12/02/2016 01:31 AM, Rainer Orth wrote: Hi Martin, PR 78521 notes that the gimple-ssa-sprintf pass doesn't do the right thing (i.e., the -Wformat-length and

[Bug tree-optimization/78681] [7 Regressions] ICE in determine_value_range, at tree-ssa-loop-niter.c:413

2016-12-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78681 --- Comment #4 from Jakub Jelinek --- Yeah: --- gcc/ipa-prop.c.jj 2016-11-25 18:11:05.0 +0100 +++ gcc/ipa-prop.c 2016-12-05 18:48:48.853882864 +0100 @@ -5709,8 +5709,23 @@ ipcp_update_vr (struct cgraph_node *node {

[Bug tree-optimization/78681] [7 Regressions] ICE in determine_value_range, at tree-ssa-loop-niter.c:413

2016-12-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78681 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Jakub Jelinek
On Mon, Dec 05, 2016 at 11:37:23AM -0700, Jeff Law wrote: > On 12/05/2016 11:30 AM, Marek Polacek wrote: > >On Mon, Dec 05, 2016 at 11:25:02AM -0700, Jeff Law wrote: > >>We're already using std::min std::max, std::swap and others. > > > >Note we're not using std::min nor std::max. I gave this a

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Jeff Law
On 12/05/2016 11:30 AM, Marek Polacek wrote: On Mon, Dec 05, 2016 at 11:25:02AM -0700, Jeff Law wrote: We're already using std::min std::max, std::swap and others. Note we're not using std::min nor std::max. I gave this a shot a while ago, but it didn't pan out:

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Jakub Jelinek
On Mon, Dec 05, 2016 at 11:25:02AM -0700, Jeff Law wrote: > >> > >>Thanks for the heads up! I just looked at that code yesterday while > >>analyzing bug 78608, wondering if it was safe. Now I know it isn't. > >>I think it might be best to simply hand code the expression instead > >>of taking a

[Bug c/78666] conflicting attribute alloc_size accepted

2016-12-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78666 --- Comment #2 from Marek Polacek --- And nonnull, sentinel, destructor, constructor too.

Re: [ARM][PATCH] Fix failing poly64 tests on ARM

2016-12-05 Thread Christophe Lyon
Hi Tamar, On 5 December 2016 at 16:32, Kyrill Tkachov wrote: > > On 05/12/16 10:39, Tamar Christina wrote: >> >> Hi All, >> >> This patch fixes test failures on arm-none-eabi. >> Poly64 was being used by files that were not supposed >> to be testing poly64 types. >>

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Marek Polacek
On Mon, Dec 05, 2016 at 11:25:02AM -0700, Jeff Law wrote: > We're already using std::min std::max, std::swap and others. Note we're not using std::min nor std::max. I gave this a shot a while ago, but it didn't pan out: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00886.html Marek

Re: [PATCH] correct handling of non-constant width and precision (pr 78521)

2016-12-05 Thread Jeff Law
On 12/05/2016 08:50 AM, Martin Sebor wrote: On 12/02/2016 08:52 AM, Martin Sebor wrote: On 12/02/2016 01:31 AM, Rainer Orth wrote: Hi Martin, PR 78521 notes that the gimple-ssa-sprintf pass doesn't do the right thing (i.e., the -Wformat-length and -fprintf-return-value options behave

Re: [PATCH] detect null sprintf pointers (PR 78519)

2016-12-05 Thread Jeff Law
On 12/04/2016 04:55 PM, Martin Sebor wrote: Bug 78519 points out that while the -Wformat warning flags a small subset of sprintf calls with a null pointer argument to a %s directive (those where the pointer is a constant) it misses the much bigger set where the pointer is not a constant but

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-05 Thread Jakub Jelinek
On Mon, Dec 05, 2016 at 11:32:15PM +0530, Prathamesh Kulkarni wrote: > So I had to check if SSA_NAME_DEF_STMT (rhs2) was call to strstr > rather than rhs1. Then you need to test both whether it is strstr (s, t) == s or s == strstr (s, t). > + gassign *ga =

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-05 Thread Prathamesh Kulkarni
On 5 December 2016 at 23:40, Prathamesh Kulkarni wrote: > On 5 December 2016 at 23:38, Bernd Schmidt wrote: >> On 12/05/2016 07:02 PM, Prathamesh Kulkarni wrote: >>> >>> This patch folds strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if >>>

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2016-12-05 Thread Prathamesh Kulkarni
On 5 December 2016 at 23:38, Bernd Schmidt wrote: > On 12/05/2016 07:02 PM, Prathamesh Kulkarni wrote: >> >> This patch folds strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if >> strlen (t) is known. > > > That's not the same thing, is it? > > s = "hello world", t = "hello":

[C++] trailing array hack

2016-12-05 Thread Nathan Sidwell
Jason, Martin. looking at pr78635, I find it related to Martin's patch of 15-12-2015 dealing with flexible array members. Martin's patch makes the following ill-formed: struct Base {int m; char ary[];}; // ends in flexible array - OK struct Derived : Base {}; // base ends in flexible array

  1   2   3   >