[PATCH][libsanitizer] Cherry-pick r211008 [Was: Re: libsanitizer merge from upstream r208536]

2014-06-23 Thread Paolo Carlini
Hi, On 06/16/2014 10:42 AM, Konstantin Serebryany wrote: On Wed, Jun 11, 2014 at 2:28 PM, Paolo Carlini wrote: Hi, On 05/22/2014 09:02 PM, Jakub Jelinek wrote: In file included from ../../../../trunk/libsanitizer/asan/asan_interceptors.cc:147:0: ../../../../trunk/libsanitizer/sanitizer_comm

Re: Another AIX Bootstrap failure

2014-06-23 Thread Jan Hubicka
> The tests gcc.dg/globalalias-2.c and gcc.dg/localalias-2.c fail on darwin with > > /opt/gcc/work/gcc/testsuite/gcc.dg/globalalias-2.c:20:2: warning: alias > definitions not supported in Mach-O; ignored > > I think they should be protected by > > /* { dg-require-alias "" } */ I see, the anoyi

Re: [Patch] Not very subtle fix for pr61510

2014-06-23 Thread Jan Hubicka
> On Mon, 23 Jun 2014, James Greenhalgh wrote: > > > > > Hi, > > > > pr61510 is a case where cgraphunit.c::analyze_functions can end up > > dereferencing a NULL pointer. This is, to me, the obvious way to avoid > > dereferencing NULL. > > > > However, I'm not very confident that this isn't just

RE: [PATCH] Fix forwporp pattern (T)(P + A) - (T)P -> (T)A

2014-06-23 Thread Bernd Edlinger
Hi, On Mon, 23 Jun 2014 19:12:47, Richard Biener wrote: > > On Mon, Jun 23, 2014 at 4:28 PM, Bernd Edlinger > wrote: >> Hi, >> >> On Mon, 23 Jun 2014 10:40:53, Richard Biener wrote: >>> >>> On Sun, Jun 22, 2014 at 9:14 AM, Bernd Edlinger >>> wrote: Hi, I noticed that several testc

Re: [PATCH][libsanitizer] Cherry-pick r211008 [Was: Re: libsanitizer merge from upstream r208536]

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 07:23:09PM +0200, Paolo Carlini wrote: > / > 2014-06-23 Paolo Carlini > > * sanitizer_common/sanitizer_common_interceptors.inc: > Cherry pick upstream r211008. Sure, thanks. > Index: sanitizer_common/sanitizer_common_interceptors.inc >

[patch] libstdc++/61532 fix make_signed failures

2014-06-23 Thread Jonathan Wakely
This fixes some more fallout from my make_signed changes and improves the make_unsigned tests which were already fixed last month. Tested x86_64-linux and powerpc64-linux, committed to trunk. I'll be making the same changes on the 4.9 branch shortly. commit 43db1e59326da5af1f75a86e37e51f015989b7

Re: calloc = malloc + memset

2014-06-23 Thread Andi Kleen
Marc Glisse writes: > Hello, > > this is a stage 1 patch, and I'll ping it then, but if you have > comments now... FWIW i believe the transformation will break a large variety of micro benchmarks. calloc internally knows that memory fresh from the OS is zeroed. But the memory may not be faulte

Re: [PATCH] Don't segv on __atomic_store (PR c/61553)

2014-06-23 Thread Marek Polacek
On Mon, Jun 23, 2014 at 04:39:55PM +0200, Marek Polacek wrote: > --- gcc/testsuite/c-c++-common/pr61553.c > +++ gcc/testsuite/c-c++-common/pr61553.c > @@ -0,0 +1,8 @@ > +/* PR c/61553 */ > +/* { dg-do compile } */ > + > +void > +foo (char *s) > +{ > + __atomic_store (s, (void *) 0, __ATOMIC_SEQ_CS

[Patch, Fortran] Fix a coarray ICE on invalid code

2014-06-23 Thread Tobias Burnus
First, the following coarray patches are still awaiting review: * https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01662.html * https://gcc.gnu.org/ml/fortran/2014-06/msg00183.html The attached patch fixes an ICE on invalid code with polymorphic coarrays. Build and regtested on x86-64-gnu-linux. OK

Re: [PATCH] Fix for invalid sanitization of trailing byte in __builtin_strlen

2014-06-23 Thread Jeff Law
On 06/23/14 10:55, Maxim Ostapenko wrote: Hi, when I applied this patch (r211846), I made a little mistake in output test patterns. This patch fixes this. Tested on x86_64-unknown-linux-gnu. Ok to commit? OK. jeff

Re: calloc = malloc + memset

2014-06-23 Thread Andrew Pinski
On Mon, Jun 23, 2014 at 11:17 AM, Andi Kleen wrote: > Marc Glisse writes: > >> Hello, >> >> this is a stage 1 patch, and I'll ping it then, but if you have >> comments now... > > FWIW i believe the transformation will break a large variety of micro > benchmarks. > > calloc internally knows that

Re: [PATCH] Only transform rotate to rotatert and v.v. if target has both

2014-06-23 Thread Jeff Law
On 06/22/14 14:58, Segher Boessenkool wrote: Many targets do not have both rotate and rotatert. Of the 47 targets in the tree, 17 have both, 9 have only rotate, 2 have only rotatert, and 19 have neither (this is based on "grep -wil" so it can be slightly off). rs6000 has only rotate, and mips h

Re: calloc = malloc + memset

2014-06-23 Thread Marc Glisse
On Mon, 23 Jun 2014, Andi Kleen wrote: FWIW i believe the transformation will break a large variety of micro benchmarks. calloc internally knows that memory fresh from the OS is zeroed. But the memory may not be faulted in yet. memset always faults in the memory. So if you have some test lik

Re: [PATCH] Fix 61565 -- cmpelim vs non-call exceptions

2014-06-23 Thread Richard Henderson
On 06/23/2014 08:55 AM, Ramana Radhakrishnan wrote: > Agreed, this is why cmpelim looks interesting for Thumb1. (We may need another > hook or something to disable it in configurations we don't need it in, but you > know ... ) Yeah. Feel free to change targetm.flags_regnum from a variable to a fu

Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)

2014-06-23 Thread David Malcolm
On Mon, 2014-06-09 at 20:32 +0100, Richard Sandiford wrote: > Steven Bosscher writes: > > On Sat, Jun 7, 2014 at 7:54 PM, Richard Sandiford wrote: > >> The two parts of the loop condition are really handling two different > >> kinds of block: ones like entry and exit that are completely empty > >>

Re: [PATCH 5/5] add libcc1

2014-06-23 Thread Jeff Law
On 06/20/14 09:33, Tom Tromey wrote: "Trevor" == Trevor Saunders writes: Trevor> I'm curious, what is the reason you choose not to write this in C++11 or Trevor> later? Its distributed with gcc, so the only case where you aren't Trevor> building with the in tree compiler and libraries is when

Re: [doc] Remove duplicate -Wmaybe-uninitialized

2014-06-23 Thread Jeff Law
On 06/22/14 11:30, Marc Glisse wrote: Hello, a trivial patch to remove a duplicated option, you can see the second one 4 lines below in the patch. (the mixed use of single or double spaces in this list is strange) This was included in the bootstrap of another patch. 2014-06-23 Marc Glisse

Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area

2014-06-23 Thread Jeff Law
On 06/23/14 08:42, Paul Gortmaker wrote: We see the following on a 32bit gcc installed on 64 bit host: Reading symbols from ./i586-pokymllib32-linux-gcc...done. (gdb) run Starting program: x86-pokymllib32-linux/lib32-gcc/4.9.0-r0/image/usr/bin/i586-pokymllib32-linux-gcc Program rec

Re: [fortran, patch] IEEE intrinsic modules (ping)

2014-06-23 Thread Steve Kargl
I meant to look this over this weekend. Unfortnately, baseball and soccer (both daughter and USA vs Portugal) got in the way. First issue, cd gcc4x patch < ieee_withregenerated_2.diff ... -- |Index: configure.host |=

Re: calloc = malloc + memset

2014-06-23 Thread Andi Kleen
On Mon, Jun 23, 2014 at 09:00:02PM +0200, Marc Glisse wrote: > On Mon, 23 Jun 2014, Andi Kleen wrote: > > >FWIW i believe the transformation will break a large variety of micro > >benchmarks. > > > >calloc internally knows that memory fresh from the OS is zeroed. > >But the memory may not be faul

RE: [PATCH] Fix forwporp pattern (T)(P + A) - (T)P -> (T)A

2014-06-23 Thread Bernd Edlinger
Hi, On Mon, 23 Jun 2014 16:22:13, Eric Botcazou wrote: > >> I noticed that several testcases in the GMP-4.3.2 test suite are failing now >> which did not happen with GCC 4.9.0. I debugged the first one, >> mpz/convert, and found the file mpn/generic/get_str.c was miscompiled. >> >> mpn/get_str.c.1

Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area

2014-06-23 Thread Tobias Burnus
This patch broke bootstrapping for me on x86-64-gnu-linux: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file `/usr/lib/crti.o' is incompatible with i386:x86-64 output If I revert the patch, it works for me. Tobias Paul Gortmaker wrote

Re: calloc = malloc + memset

2014-06-23 Thread Marc Glisse
On Mon, 23 Jun 2014, Andi Kleen wrote: I would prefer to not do it. For the sake of micro benchmarks? I'm not sure it has a lot of benefit. It has a non-zero benefit. If you want to keep it please make sure there is an easy way to turn it off. Any of these flags works: -fdisable-tree-s

Re: [fortran, patch] IEEE intrinsic modules (ping)

2014-06-23 Thread Steve Kargl
On Mon, Jun 23, 2014 at 12:23:39PM -0700, Steve Kargl wrote: > I meant to look this over this weekend. Unfortnately, baseball > and soccer (both daughter and USA vs Portugal) got in the way. > First issue, > > cd gcc4x > patch < ieee_withregenerated_2.diff > ... > -- > |I

Re: calloc = malloc + memset

2014-06-23 Thread Andi Kleen
On Mon, Jun 23, 2014 at 10:14:25PM +0200, Marc Glisse wrote: > On Mon, 23 Jun 2014, Andi Kleen wrote: > > >I would prefer to not do it. > > For the sake of micro benchmarks? Yes benchmarks are important. -Andi

Re: calloc = malloc + memset

2014-06-23 Thread Andrew Pinski
On Mon, Jun 23, 2014 at 1:21 PM, Andi Kleen wrote: > On Mon, Jun 23, 2014 at 10:14:25PM +0200, Marc Glisse wrote: >> On Mon, 23 Jun 2014, Andi Kleen wrote: >> >> >I would prefer to not do it. >> >> For the sake of micro benchmarks? > > Yes benchmarks are important. But micro-benchmarks are not i

Move DECL_VINDEX and DECL_SAVED_TREE into function_decl

2014-06-23 Thread Jan Hubicka
Hi, this patch makes DECL_VINDEX and DECL_SAVED_TREE to be FUNCTION_DECL only. This needs to resolve overloading in C++ FE. For namespaces I added new fields in lang specific annotation and for TEMPLATE_DECL I moved the overload to UNIT_SIZE that is currently unused. My incremental plan is to 1)

Re: [patch] libstdc++/61532 fix make_signed failures

2014-06-23 Thread Jonathan Wakely
On 23/06/14 19:18 +0100, Jonathan Wakely wrote: This fixes some more fallout from my make_signed changes and improves the make_unsigned tests which were already fixed last month. Tested x86_64-linux and powerpc64-linux, committed to trunk. I'll be making the same changes on the 4.9 branch shortl

Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area

2014-06-23 Thread Jeff Law
On 06/23/14 14:09, Tobias Burnus wrote: This patch broke bootstrapping for me on x86-64-gnu-linux: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file `/usr/lib/crti.o' is incompatible with i386:x86-64 output If I revert the patch, it wo

Re: Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)

2014-06-23 Thread Oleg Endo
On Mon, 2014-06-23 at 14:54 -0400, David Malcolm wrote: > FWIW I'm actually working on such a change, or, at least, to make > instructions be a subclass of rtx_def; presumably this should make it > easier to make it an entirely separate type, if that's desirable. > > Executive summary is that it'

Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 02:32:37PM -0600, Jeff Law wrote: > On 06/23/14 14:09, Tobias Burnus wrote: > >This patch broke bootstrapping for me on x86-64-gnu-linux: > > > >/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: > >i386 architecture of input file `/usr/lib/crti.o' is

[Committed] New testcase for conditional move with conditional compares

2014-06-23 Thread Andrew Pinski
Hi, When looking at the current conditional compare patch, I find that we don't have a testcase to test that we don't ICE for the case where we have conditional compares and conditional moves where the moves are of floating point types. This patch adds that testcase to the C torture compile test

[patch] fix namespaces for std::experimental types

2014-06-23 Thread Jonathan Wakely
The current Fundamentals TS says any, optional and string_view should be in an inline namespace called fundamentals_v1. Tested x86_64-linux, committed to trunk. commit 3b316b60d21ea224c56bb23a8e1afb06e2277cf8 Author: Jonathan Wakely Date: Mon Jun 23 21:34:29 2014 +0100 * include/experim

RE: [PATCH,MIPS] MIPS64r6 support

2014-06-23 Thread Steve Ellcey
On Mon, 2014-06-23 at 03:31 -0700, Matthew Fortune wrote: > > > Recommendations on how to rework the mips.exp logic to cope with this > > > would be appreciated. > > > > Could you give an example of the kind of thing you mean? > > You have actually covered the cases I was concerned about below.

Re: [PATCH] Introducing SAD (Sum of Absolute Differences) operation to GCC vectorizer.

2014-06-23 Thread Cong Hou
It has been 8 months since this patch is posted. I have addressed all comments to this patch. The SAD pattern is very useful for some multimedia algorithms like ffmpeg. This patch will greatly improve the performance of such algorithms. Could you please have a look again and check if it is OK for

Re: [PATCH 5/5] add libcc1

2014-06-23 Thread Trevor Saunders
On Mon, Jun 23, 2014 at 01:09:41PM -0600, Jeff Law wrote: > On 06/20/14 09:33, Tom Tromey wrote: > >>"Trevor" == Trevor Saunders writes: > > > >Trevor> I'm curious, what is the reason you choose not to write this in > >C++11 or > >Trevor> later? Its distributed with gcc, so the only case whe

Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area

2014-06-23 Thread Paul Gortmaker
[Re: [PATCH] gcc: fix segfault from calling free on non-malloc'd area] On 23/06/2014 (Mon 14:32) Jeff Law wrote: > On 06/23/14 14:09, Tobias Burnus wrote: > >This patch broke bootstrapping for me on x86-64-gnu-linux: > > > >/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld

Re: [patch] change specific int128 -> generic intN

2014-06-23 Thread DJ Delorie
> Since the test on __STRICT_ANSI__ is removed for all other uses, it would > seem consistent to me to remove this one as well. Besides, you are already > testing __GLIBCXX_USE_INT_N_0, which as far as I understand is protected > by !flag_iso (with the exception of size_t). Yup, I'll clean tha

Re: [patch] change specific int128 -> generic intN

2014-06-23 Thread DJ Delorie
> The changes to dwarf2asm.c, cppbuiltin.c, optabs.c, defaults.h, expr.c, > expmed.c, tree-dfa.c, simplify-rtx.c, lto-object.c, loop-iv.c, varasm.c, > the msp430 back end and some of the stor-layout.c changes don't look like > they should depend on the rest of the patch. I think it would help

Re: [PATCH] Fix for invalid sanitization of trailing byte in __builtin_strlen

2014-06-23 Thread Maxim Ostapenko
On 06/23/2014 10:11 PM, Jeff Law wrote: On 06/23/14 10:55, Maxim Ostapenko wrote: Hi, when I applied this patch (r211846), I made a little mistake in output test patterns. This patch fixes this. Tested on x86_64-unknown-linux-gnu. Ok to commit? OK. jeff Thanks, done in r211927. -Maxim

[RFC] Making fold-const sane WRT symbol visibilities

2014-06-23 Thread Jan Hubicka
Hello, fold-const contains quite few confused statements that deal with WEAK visibility and aliases: static int simple_operand_p (const_tree exp) { /* Strip any conversions that don't change the machine mode. */ STRIP_NOPS (exp); return (CONSTANT_CLASS_P (exp) || TREE_CODE (exp)

Re: Fortran OpenMP UDR fixes, nested handling fixes etc.

2014-06-23 Thread Tobias Burnus
Jakub Jelinek wrote: So, either we need something like the following patch (incremental), or another possibility for the problem is not do the value.function.name related change in module.c in the UDR patch, and instead fix up the UDR combiner/initializer expressions when they are loaded from mod

Re: [PATCH, PR61554] ICE during CCP

2014-06-23 Thread Chung-Lin Tang
On 2014/6/23 04:45 PM, Richard Biener wrote: > On Mon, Jun 23, 2014 at 7:32 AM, Chung-Lin Tang > wrote: >> Hi Richard, >> >> In this change: >> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01278.html >> >> where substitute_and_fold() was changed to use a dom walker, the calls >> to purge dead EH

Re: [PATCH] Fix up -march=native handling under KVM (PR target/61570)

2014-06-23 Thread Uros Bizjak
On Mon, Jun 23, 2014 at 6:29 PM, H.J. Lu wrote: > --- gcc/config/i386/driver-i386.c.jj2014-05-14 14:45:54.0 > +0200 > +++ gcc/config/i386/driver-i386.c 2014-06-20 18:59:57.805006358 > +0200 > @@ -745,6 +745,11 @@ const char *host_detect_local_cpu (int

<    1   2