Re: PR debug/60655, debug loc expressions

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 05:25:57PM +1030, Alan Modra wrote: > Ping? > https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00704.html I think the simplification should be done when constructing the expressions, i.e. if possible in the simplification callback or so if it isn't performed at some level. Bec

Re: Check that unlinked uses do not contain ssa-names when renaming.

2014-10-16 Thread Tom de Vries
On 08/10/12 11:24, Richard Guenther wrote: > On Sun, Oct 7, 2012 at 12:44 PM, Tom de Vries wrote: >> Richard, >> >> attached patch checks that unlinked uses do not contain ssa-names when >> renaming. >> >> This assert triggers when compiling (without the fix) the PR54735 example. >> >> AFAIU, it

Re: [PATCH i386 AVX512] [78/n] Use blend for inserting.

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 10:24:45AM +0400, Kirill Yukhin wrote: > Hello, > This patch extends insertion hook. > > AVX-512* tests on top of patch-set all pass > under simulator. > > > gcc/ > * config/i386/i386.c > (ix86_expand_vector_set): Handle V8DF, V8DI, V16SF, V16SI, V32HI, V64QI

Re: NRV with address taken

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 07:37:18AM +0200, Marc Glisse wrote: > Hello, > > the attached one-liner passed bootstrap+testsuite (really all languages) on > x86_64-linux-gnu (I got an extra pass of unix/-m32: os but I assume that the > failure with trunk was random). > > The current code is a bit weir

Re: Towards GNU11

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 12:08 PM, Marek Polacek wrote: > On Tue, Oct 14, 2014 at 09:23:29AM +0200, Marek Polacek wrote: >> The consensus seems to be to go forward with this change. I will >> commit the patch in 24 hours unless I hear objections. > > I made the change. Please report any fallout t

Re: [lto] don't assume pointer size

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 12:07 AM, DJ Delorie wrote: > > In the event that pointer sizes aren't powers of two, choose a more > suitable alignment than (unsigned)(-1), which results in HUGE file > sizes. Ok? Ok. Thanks, Richard. > Index: gcc/lto/lto-object.c > ===

Re: [v3] Minimally exercise the other alias_decls in

2014-10-16 Thread Paolo Carlini
... the below completes the work, no -std=gnu++0x anymore. Paolo. / 2014-10-16 Paolo Carlini * testsuite/lib/libstdc++.exp: Prefer -std=gnu++11. * testsuite/20_util/add_lvalue_reference/requirements/ explicit_instantiation.cc: Likewise. * t

Re: Check that unlinked uses do not contain ssa-names when renaming.

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 9:20 AM, Tom de Vries wrote: > On 08/10/12 11:24, Richard Guenther wrote: >> On Sun, Oct 7, 2012 at 12:44 PM, Tom de Vries wrote: >>> Richard, >>> >>> attached patch checks that unlinked uses do not contain ssa-names when >>> renaming. >>> >>> This assert triggers when co

Re: NRV with address taken

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 9:31 AM, Jakub Jelinek wrote: > On Thu, Oct 16, 2014 at 07:37:18AM +0200, Marc Glisse wrote: >> Hello, >> >> the attached one-liner passed bootstrap+testsuite (really all languages) on >> x86_64-linux-gnu (I got an extra pass of unix/-m32: os but I assume that the >> failur

[PATCH 0/17] KASan 4.9 backport

2014-10-16 Thread Yury Gribov
Hi all, As discussed in https://gcc.gnu.org/ml/gcc/2014-09/msg00234.html , this patchset backports mainline patches necessary for Kernel ASan in GCC 4.9 (gcc-4_9-branch). The patcheset consists of * Asan headers installation (1 patch) * __asan_loadN/__asan_storeN support (3 patches) * instrume

[PATCH 1/17] Install asan_interface.h

2014-10-16 Thread Yury Gribov
This patch adds support for asan_interface.h installation (it's required by tests in other patches). One change compared to mainline: asan_interface.h in 4.9 isn't C friendly (it uses bool type) so I had to replace bool with unsigned char in tests. The actual value isn't used by the test so I

[PATCH 3/17] Instrumentation of unaligned types

2014-10-16 Thread Yury Gribov
Further work on __asan_loadN/__asan_storeN. I removed the tests (misalign-1.c, misalign-2.c) because (as mentioned in comments for preceeding patch) __asan_loadN/__asan_storeN are disabled for userspace. 2014-10-15 Yury Gribov Backport from mainline 2014-05-30 Jakub Jelinek * asan.c (

[committed] gnu11 fallout: i686

2014-10-16 Thread Marek Polacek
The following is a patch by Jakub that ought to fix gnu11 fallout on i686. Applying to trunk. 2014-10-16 Jakub Jelinek Marek Polacek * gcc.dg/20020122-2.c: Use dg-additional-options. Fix implicit declarations. * gcc.dg/pr32176.c: Likewise. * gcc.

[PATCH 2/17] Introduction of __asan_loadN/__asan_storeN

2014-10-16 Thread Yury Gribov
I disabled __asan_loadN/__asan_storeN because 4.9's Asan runtime doesn't support them. In a later patch I re-enable these functions specifically for KAsan. 2014-10-15 Yury Gribov Backport from mainline 2014-05-30 Jakub Jelinek * sanitizer.def (BUILT_IN_ASAN_REPORT_LOAD_N, BUILT_IN_ASA

[PATCH 4/17] Outline instrumentation

2014-10-16 Thread Yury Gribov
4.9's Asan runtime library provides no support for these so I removed the tests. I've also changed default value of threshold to INT_MAX to completely disable outline instrumentation in userspace Asan. New asan-instrumentation-with-call-threshold parameter. 2014-10-15 Yury Gribov Backport f

[PATCH 5/17] Fix bootstrap error

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-06-16 Yury Gribov * asan.c (build_check_stmt): Fix maybe-uninitialized warning. diff --git a/gcc/asan.c b/gcc/asan.c index 5c091d0..3729178 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1635,6 +1635,13 @@ build_check_s

[PATCH 7/17] Fix for PR 61547

2014-10-16 Thread Yury Gribov
Difference from mainline: replaced non-C-friendly bool with unsigned char (see patch 0001 for explanation). 2014-10-15 Yury Gribov Backport from mainline 2014-06-18 Yury Gribov PR sanitizer/61547 * asan.c (instrument_strlen_call): Fixed instrumentation of trailing byte. * c-c++-com

[PATCH 6/17] Fix for PR 61530

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-06-18 Yury Gribov PR sanitizer/61530 * asan.c (build_check_stmt): Add condition. * c-c++-common/asan/pr61530.c: New test. diff --git a/gcc/asan.c b/gcc/asan.c index 3729178..c838423 100644 --- a/gcc/asan.c +++ b/g

[PATCH 8/17] Optimization of strlen instrumentation

2014-10-16 Thread Yury Gribov
Difference from mainline: replaced non-C-friendly bool with unsigned char (see patch 0001 for explanation). Do not instrument first byte in strlen if already instrumented. 2014-10-15 Yury Gribov Backport from mainline 2014-06-24 Max Ostapenko * asan.c (instrument_strlen_call): Do not i

[PATCH 9/17] Initial KAsan support

2014-10-16 Thread Yury Gribov
The patch was slightly updated to take care of missing UBSan work (SANITIZE_FLOAT_DIVIDE, SANITIZE_FLOAT_CAST, SANITIZE_BOUNDS). 2014-10-15 Yury Gribov Backport from mainline 2014-07-31 Yury Gribov * doc/cpp.texi (__SANITIZE_ADDRESS__): Updated description. * doc/invoke.texi (-fsanitiz

[PATCH 11/17] Move Asan instrumentation to sanopt pass

2014-10-16 Thread Yury Gribov
The patch was slightly updated to take care of missing UBSan work (UBSAN_BOUNDS). Move inlining of Asan memory checks to sanopt pass. Change asan-instrumentation-with-call-threshold to more closely match LLVM. 2014-10-15 Yury Gribov Backport from mainline 2014-08-11 Yury Gribov * asan.

[PATCH 10/17] Support fnspec for internal fns

2014-10-16 Thread Yury Gribov
The patch was slightly updated to take care of missing UBSan work (UBSAN_BOUNDS). Added fnspec to internal functions. 2014-10-15 Yury Gribov Backport from mainline 2014-08-11 Yury Gribov * gimple.c (gimple_call_fnspec): Support internal functions. (gimple_call_return_fla

[PATCH 12/17] Fix off-by-one

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-08-12 Yury Gribov * internal-fn.c (init_internal_fns): Fix off-by-one. diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 0749dce..d64e20d 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -62,7 +62,7 @@

Re: [PATCH 1/17] Install asan_interface.h

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:35:51PM +0400, Yury Gribov wrote: > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-05-14 Yury Gribov > > PR sanitizer/61100 > > * Makefile.am (nodist_saninclude_HEADERS): Install > public headers. > * Makefile.in: Reg

[PATCH 13/17] Fix for PR 62089

2014-10-16 Thread Yury Gribov
Difference from mainline: replaced non-C-friendly bool with unsigned char (see patch 0001 for explanation). 2014-10-15 Yury Gribov Backport from mainline 2014-08-18 Yury Gribov PR sanitizer/62089 * asan.c (instrument_derefs): Fix bitfield check. * c-c++-common/asan/pr62089.c: New te

[PATCH 14/17] Fix test on 32-bit platforms

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-08-28 Yury Gribov * c-c++-common/asan/pr62089.c: Fix test on 32-bit platforms. diff --git a/gcc/testsuite/c-c++-common/asan/pr62089.c b/gcc/testsuite/c-c++-common/asan/pr62089.c index 6c25ea4..48167b1 100644 --- a/gcc

[PATCH 15/17] Fix for PR 61897 and PR 62140

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-09-01 Yury Gribov PR sanitizer/61897 PR sanitizer/62140 * asan.c (asan_mem_ref_get_end): Handle non-ptroff_t lengths. (build_check_stmt): Likewise. (instrument_strlen_call): Likewise. (asan_expand_check_ifn): Lik

[PATCH 16/17] Disable __asan_init calls for KASan

2014-10-16 Thread Yury Gribov
Same as mainline. 2014-10-15 Yury Gribov Backport from mainline 2014-10-03 Yury Gribov * asan.c (asan_finish_file): Disable __asan_init calls for KASan; don't emit empty ctors. diff --git a/gcc/asan.c b/gcc/asan.c index 5c6d1c5..b8fbed3 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -238

[PATCH 17/17] Enable __asan_loadN/__asan_storeN for KASan

2014-10-16 Thread Yury Gribov
Not a backport, specifically enables said instructions in KASan. Instrument unaligned objects in KASan. 2014-10-15 Yury Gribov * asan.c (instrument_derefs): Enable unaligned path for KASan. diff --git a/gcc/asan.c b/gcc/asan.c index b8fbed3..db4e3a0 100644 --- a/gcc/asan.c +++ b/gcc/asan.c

Re: [PATCH 2/17] Introduction of __asan_loadN/__asan_storeN

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:36:15PM +0400, Yury Gribov wrote: > I disabled __asan_loadN/__asan_storeN because 4.9's Asan runtime doesn't > support them. In a later patch I re-enable these functions specifically for > KAsan. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-

Re: [PATCH 3/17] Instrumentation of unaligned types

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:36:37PM +0400, Yury Gribov wrote: > Further work on __asan_loadN/__asan_storeN. I removed the tests > (misalign-1.c, misalign-2.c) because (as mentioned in comments for > preceeding patch) __asan_loadN/__asan_storeN are disabled for userspace. > 2014-10-15 Yury Gribov

Re: [PATCH 4/17] Outline instrumentation

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:37:37PM +0400, Yury Gribov wrote: > 4.9's Asan runtime library provides no support for these so I removed the > tests. I've also changed default value of threshold to INT_MAX to completely > disable outline instrumentation in userspace Asan. > New asan-instrumentation-wi

Re: [PATCH 5/17] Fix bootstrap error

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:38:00PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-06-16 Yury Gribov > > * asan.c (build_check_stmt): Fix maybe-uninitialized warning. Ok. Jakub

Re: [PATCH 6/17] Fix for PR 61530

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:38:19PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-06-18 Yury Gribov > > PR sanitizer/61530 > > * asan.c (build_check_stmt): Add condition. > > * c-c++-common/asan/pr615

Re: [PATCH 7/17] Fix for PR 61547

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:38:51PM +0400, Yury Gribov wrote: > Difference from mainline: replaced non-C-friendly bool with unsigned char > (see patch 0001 for explanation). > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-06-18 Yury Gribov > > PR sanitizer/61547

Re: [PATCH 8/17] Optimization of strlen instrumentation

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:39:17PM +0400, Yury Gribov wrote: > Difference from mainline: replaced non-C-friendly bool with unsigned char > (see patch 0001 for explanation). Where? I don't see unsigned char being used anywhere in the patch. bool is certainly fine in GCC itself. > Do not instrumen

Re: [PATCH 9/17] Initial KAsan support

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:39:56PM +0400, Yury Gribov wrote: > The patch was slightly updated to take care of missing UBSan work > (SANITIZE_FLOAT_DIVIDE, SANITIZE_FLOAT_CAST, SANITIZE_BOUNDS). > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-07-31 Yury Gribov > >

Re: [PATCH 12/17] Fix off-by-one

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:41:03PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-08-12 Yury Gribov > > * internal-fn.c (init_internal_fns): Fix off-by-one. Ok. Jakub

Re: [PATCH 10/17] Support fnspec for internal fns

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:40:17PM +0400, Yury Gribov wrote: > The patch was slightly updated to take care of missing UBSan work > (UBSAN_BOUNDS). > Added fnspec to internal functions. > > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-08-11 Yury Gribov > > *

Re: [PATCH 11/17] Move Asan instrumentation to sanopt pass

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:40:44PM +0400, Yury Gribov wrote: > The patch was slightly updated to take care of missing UBSan work > (UBSAN_BOUNDS). > Move inlining of Asan memory checks to sanopt pass. > Change asan-instrumentation-with-call-threshold to more closely match LLVM. > > 2014-10-15 Yu

Re: [PATCH 14/17] Fix test on 32-bit platforms

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:41:46PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-08-28 Yury Gribov > > * c-c++-common/asan/pr62089.c: Fix test on 32-bit platforms. Ok. Jakub

Re: [PATCH 13/17] Fix for PR 62089

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:41:24PM +0400, Yury Gribov wrote: > Difference from mainline: replaced non-C-friendly bool with unsigned char > (see patch 0001 for explanation). > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-08-18 Yury Gribov > > PR sanitizer/62089

Re: [PATCH 16/17] Disable __asan_init calls for KASan

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:42:28PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-10-03 Yury Gribov > > * asan.c (asan_finish_file): Disable __asan_init calls for KASan; > don't emit empty ctors. Ok.

Re: [PATCH 15/17] Fix for PR 61897 and PR 62140

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:42:09PM +0400, Yury Gribov wrote: > Same as mainline. > 2014-10-15 Yury Gribov > > Backport from mainline > 2014-09-01 Yury Gribov > > PR sanitizer/61897 > PR sanitizer/62140 > > * asan.c (asan_mem_ref_get_end): Handle non-ptroff_t

Re: [PATCH 17/17] Enable __asan_loadN/__asan_storeN for KASan

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 12:43:25PM +0400, Yury Gribov wrote: > Not a backport, specifically enables said instructions in KASan. > Instrument unaligned objects in KASan. > > 2014-10-15 Yury Gribov > > * asan.c (instrument_derefs): Enable unaligned path for KASan. > > diff --git a/gcc/as

Re: NRV with address taken

2014-10-16 Thread Marc Glisse
On Thu, 16 Oct 2014, Richard Biener wrote: Does this fix PR63537? PR63537 is already fine for me with trunk, NRV replaces ret with retval everywhere. It does so even if I add f(&ret); in the function with void f(vec*); I'd worry if both result and found are address taken before the pass,

Re: [PATCH 8/17] Optimization of strlen instrumentation

2014-10-16 Thread Yury Gribov
On 10/16/2014 12:49 PM, Jakub Jelinek wrote: On Thu, Oct 16, 2014 at 12:39:17PM +0400, Yury Gribov wrote: Difference from mainline: replaced non-C-friendly bool with unsigned char (see patch 0001 for explanation). Where? I don't see unsigned char being used anywhere in the patch. bool is cert

[committed] gnu11 fallout: ada

2014-10-16 Thread Marek Polacek
This fixes one test in the Ada testsuite (there may be more of these). Applying to trunk. 2014-10-16 Marek Polacek * ada/acats/tests/cd/cd300051.c: Fix defaulting to int. diff --git gcc/testsuite/ada/acats/tests/cd/cd300051.c gcc/testsuite/ada/acats/tests/cd/cd300051.c index 5771fc8

[PATCH] Fix PR63554, move strncat_chk folding to GIMPLE

2014-10-16 Thread Richard Biener
Another one (ok, I should really sit down and move all the remaining string related foldings). Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2014-10-16 Richard Biener PR middle-end/63554 * builtins.c (fold_builtin_4): Do not call fold_builtin_strncat_chk.

Re: [PATCH, i386]: Fix PR 59432, sync/atomic FAILs on 32bit x86 systems without .cfi directives

2014-10-16 Thread Andi Kleen
Uros Bizjak writes: > Hello! > > Now that %ebx is no more fixed, we can remove all PIC related > complications in atomic_compare_and_swap_doubleword pattern. The > immediate consequence is, that we avoid "hidden" xchgs that clobbered > unwinding state. Could also do the same in cpuid.h now -And

[PATCH] Fix PR63168

2014-10-16 Thread Richard Biener
We can fail to copy loop headers if the loop looks proper to us (empty latch) even when the latch really isn't empty and just contains a PHI node. In this case cfgcleanup should have merged it with the previous block but it fails to do that because of an overly strict check. Fixed by only "prese

[PATCH, PR61605, 1/2] Handle copy cycles in pass_cprop_hardreg

2014-10-16 Thread Tom de Vries
Eric, this patch is the first half of the fix for PR61605. The problem it addresses is the following: Consider this copy cycle (a = b; b = a): ... (insn 2 18 3 2 (set (reg/v:SI 1 dx [orig:86 yD.1749 ] [86]) (reg:SI 5 di [ yD.1749 ])) test.c:9 90 {*movsi_internal} (expr_list:REG_DEA

[PATCH, PR61605, 2/2] Use fuse-caller-save info in pass_cprop_hardreg

2014-10-16 Thread Tom de Vries
Eric, this patch is the second half of the fix for PR61605. It make sure in pass_cprop_hardreg that, if available we use the call-specific information provided by fuse-caller-save, rather than the generic regs_invalidated_by_call info. The 2 patches together allow an insn to removed from the

Re: [PATCH, i386]: Fix PR 59432, sync/atomic FAILs on 32bit x86 systems without .cfi directives

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 11:06 AM, Andi Kleen wrote: >> Now that %ebx is no more fixed, we can remove all PIC related >> complications in atomic_compare_and_swap_doubleword pattern. The >> immediate consequence is, that we avoid "hidden" xchgs that clobbered >> unwinding state. > > Could also do t

[RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h

2014-10-16 Thread Uros Bizjak
Hello! Now that %ebx is also allocatable in PIC modes, we can cleanup config/i386/cpuid considerably. I propose to remove all PIC related specializations of __cpuid and __cpuid_count and protect the compilation with "#if __GNUC__ >= 5". The only drawback would be that non-bootstrapped build with

Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 11:19:49AM +0200, Uros Bizjak wrote: > Hello! > > Now that %ebx is also allocatable in PIC modes, we can cleanup > config/i386/cpuid considerably. I propose to remove all PIC related > specializations of __cpuid and __cpuid_count and protect the > compilation with "#if __GN

Re: NRV with address taken

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 11:03 AM, Marc Glisse wrote: > On Thu, 16 Oct 2014, Richard Biener wrote: > >> Does this fix PR63537? > > > PR63537 is already fine for me with trunk, NRV replaces ret with retval > everywhere. It does so even if I add f(&ret); in the function with void > f(vec*); > >>> I'd

Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 11:24 AM, Jakub Jelinek wrote: >> Now that %ebx is also allocatable in PIC modes, we can cleanup >> config/i386/cpuid considerably. I propose to remove all PIC related >> specializations of __cpuid and __cpuid_count and protect the >> compilation with "#if __GNUC__ >= 5".

Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 11:28:20AM +0200, Uros Bizjak wrote: > On Thu, Oct 16, 2014 at 11:24 AM, Jakub Jelinek wrote: > > >> Now that %ebx is also allocatable in PIC modes, we can cleanup > >> config/i386/cpuid considerably. I propose to remove all PIC related > >> specializations of __cpuid and

Re: [Bug libstdc++/63500] [4.9/5 Regression] bug in debug version of std::make_move_iterator?

2014-10-16 Thread Jonathan Wakely
On 15/10/14 22:06 +0200, François Dumont wrote: On 15/10/2014 13:10, Jonathan Wakely wrote: I find this much easier to read: #if __cplusplus < 201103L typedef _Is_contiguous_sequence<_Sequence> __tag; #else using __lvalref = std::is_lvalue_reference< typename std::iterator_traits

gnu11 fallout: ia64

2014-10-16 Thread Andreas Schwab
Tested on ia64-suse-linux, installed as obvious. Andreas. * gcc.target/ia64/20090324-1.c: Fix implicit declarations and implicit int. * gcc.target/ia64/mfused-madd-vect.c: Likewise. * gcc.target/ia64/mno-fused-madd-vect.c: Likewise. * gcc.target/ia64/pr2968

gnu11 fallout: m68k

2014-10-16 Thread Andreas Schwab
Tested on m68k-suse-linux and installed as obvious. Andreas. * gcc.target/m68k/crash1.c: Fix implicit declaration. diff --git a/gcc/testsuite/gcc.target/m68k/crash1.c b/gcc/testsuite/gcc.target/m68k/crash1.c index fdd737a..2554d62 100644 --- a/gcc/testsuite/gcc.target/m68k/crash1.c +++

Re: [Ping] Port of VTV for Cygwin and MinGW

2014-10-16 Thread Patrick Wollgast
On 09.10.2014 16:42, Kai Tietz wrote: >> Not approved: >> * gcc/cp/vtable-class-hierarchy.c > > Index: gcc/cp/vtable-class-hierarchy.c > === > --- gcc/cp/vtable-class-hierarchy.c(Revision 214408) > +++ gcc/cp/vtable-class-hierarch

Re: [PATCH i386 AVX512] [63.1/n] Add vpshufb, perm autogen (except for v64qi).

2014-10-16 Thread Ilya Tocar
On 10 Oct 18:37, Uros Bizjak wrote: > On Fri, Oct 10, 2014 at 5:47 PM, Ilya Tocar wrote: > > > Please recode that horrible first switch statement to: > > --cut here-- > rtx (*gen) (rtx, rtx, rtx, rtx) = NULL; > > switch (mode) > { > case V8HImode: > if (TARGET_AVX512VL && TAR

Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 11:36 AM, Jakub Jelinek wrote: >> >> Now that %ebx is also allocatable in PIC modes, we can cleanup >> >> config/i386/cpuid considerably. I propose to remove all PIC related >> >> specializations of __cpuid and __cpuid_count and protect the >> >> compilation with "#if __GN

Re: __intN patch 3/5: main __int128 -> __intN conversion.

2014-10-16 Thread Andreas Schwab
FAIL: g++.dg/init/enum1.C -std=gnu++11 (test for errors, line 12) FAIL: g++.dg/init/enum1.C -std=gnu++1y (test for errors, line 12) FAIL: g++.dg/init/enum1.C -std=gnu++98 (test for errors, line 12) That used to complain about "enum1.C:12:1: error: no integral type can represent all of the en

[SH][committed] PR 53513 Make FPU mode switches not use __fpscr_values

2014-10-16 Thread Oleg Endo
Hi, As discussed in the PR, the __fpscr_values based FPU mode switching is replaced by other means, which preserve the other FPU mode and status bits across mode switches. For details please refer to the coments in the PR. Tested on sh-sim with -m4 -ml and -m4 -mb without new failures, except fo

[PATCH][match-and-simplify] More ternary commutative ops, canonicalize operand order before generic_simplify

2014-10-16 Thread Richard Biener
This patch (also applicable to trunk) makes us canoncialize operand order for comparisons at the same time we canonicalize other operand order, in particular before dispatching to generic_simplify. It also adds operand canonicalization to ternary ops and adds FMA_EXPR and DOT_PROD_EXPR to the list

Re: [PATCH i386 AVX512] [63.1/n] Add vpshufb, perm autogen (except for v64qi).

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 02:23:16PM +0400, Ilya Tocar wrote: > On 10 Oct 18:37, Uros Bizjak wrote: > > On Fri, Oct 10, 2014 at 5:47 PM, Ilya Tocar wrote: > > > > > > Please recode that horrible first switch statement to: > > > > --cut here-- > > rtx (*gen) (rtx, rtx, rtx, rtx) = NULL; > > > >

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-16 Thread Ilya Verbin
On 15 Oct 16:38, Jakub Jelinek wrote: > > Done. But it turned out that the gcc_GAS_CHECK_FEATURE from > > gcc/configure.ac: > > > > gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, > > [2,22,51],, > > [.section foo1,"e" > > .byte 0,0,0,0]) > > > > does not work properly.

Re: [PATCH i386 AVX512] [79/n] Extend expand_mul_widen_hilo.

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 8:28 AM, Kirill Yukhin wrote: > Hello, > This patch extends expand_mul_widen_hilo to 512-bit QI,SI,HI modes. > > Bootstrapped and regtested > > gcc/ > * config/i386/i386.c > (ix86_expand_mul_widen_hilo): Handle V32HI, V16SI, V64QI modes. > > Is it ok for tru

Re: [PATCH i386 AVX512] [78/n] Use blend for inserting.

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 9:28 AM, Jakub Jelinek wrote: > On Thu, Oct 16, 2014 at 10:24:45AM +0400, Kirill Yukhin wrote: >> Hello, >> This patch extends insertion hook. >> >> AVX-512* tests on top of patch-set all pass >> under simulator. >> >> >> gcc/ >> * config/i386/i386.c >> (ix86_ex

Re: update address taken: don't drop clobbers

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 6:08 PM, Jeff Law wrote: > On 10/15/14 08:35, Marc Glisse wrote: >>> >>> >>> Would that extra pass be acceptable? Ugh, rather not. We have too many passes ;) >>> Otherwise, what do you think should be responsible for cleaning up the >>> dead assignments? >> >> >> Does an

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 03:17:36PM +0400, Ilya Verbin wrote: > On 15 Oct 16:38, Jakub Jelinek wrote: > > > Done. But it turned out that the gcc_GAS_CHECK_FEATURE from > > > gcc/configure.ac: > > > > > > gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, > > > [2,22,51],, > > >

Re: [RFC] Compile-time gimple-checking (again)

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 6:15 PM, David Malcolm wrote: > Back in March I posted an 89-patch kit to expand and make use of the > gimple statement class hierarchy to move much of the type-checking of > statement accessors to be at compile-time rather than run-time: > https://gcc.gnu.org/ml/gcc-pat

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: > Hello. > > Following patch introduces a new class called callgraph_annotation. Idea > behind the patch is to provide a generic interface one can use to register > custom info related to a cgraph_node. As you know, symbol_table provides > hooks

Re: [PATCH] PR lto/61048 Write/read option -fsanitize to/from object files

2014-10-16 Thread Richard Biener
On Wed, Oct 15, 2014 at 4:47 PM, Ilya Palachev wrote: > Hi all, > > The attached patch fixes PR lto/61048. > > The basic idea is to write option -fsanitize to existing ELF section > .gnu.lto_.opts in object files and then read it in lto-wrapper. > > On 15.10.2014 12:46, Richard Biener wrote: >> >>

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> > I don't like "generic annotation" facilities at all. Would it be possible Why? > to make cgraph UIDs not sparse? (keep a free-list of cgraph nodes cgraph nodes are already kept "dense" via freelist. However in WPA you usually have a lot of different nodes prior merging and unreachable c

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 01:31 PM, Richard Biener wrote: On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related to a cgraph_node. As

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: >> >> I don't like "generic annotation" facilities at all. Would it be possible > > Why? Because it's the way to hell if the IL has "magic" things only one pass can understand. It can't ever know if it may invalidate some of that data. Same r

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 1:42 PM, Martin Liška wrote: > On 10/16/2014 01:31 PM, Richard Biener wrote: >> >> On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška wrote: >>> >>> Hello. >>> >>> Following patch introduces a new class called callgraph_annotation. Idea >>> behind the patch is to provide a gene

[committed] gnu11 fallout: graphite

2014-10-16 Thread Marek Polacek
This fixes fallout of graphite tests. Applying to trunk. 2014-10-16 Marek Polacek * gcc.dg/graphite/id-1.c: Fix defaulting to int. * gcc.dg/graphite/id-2.c: Likewise. * gcc.dg/graphite/id-4.c: Likewise. * gcc.dg/graphite/id-8.c: Likewise. * gcc.dg/graph

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka wrote: > >> > >> I don't like "generic annotation" facilities at all. Would it be possible > > > > Why? > > Because it's the way to hell if the IL has "magic" things only one > pass can understand. It can't ever know if it may invalidate some > of

[PATCH] Simple improvement for predicate computation in if-convert phase.

2014-10-16 Thread Yuri Rumyantsev
Hi All, Here is a simple enhancement for predicate computation in if-convert phase: We use notion of cd equivalence to get simpler predicate for join block, e.g. if join block has 2 predecessors with predicates p1 & p2 and p1 & !p2, we'd like to get p1 for it instead of p1 & p2 |

[PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-16 Thread Kirill Yukhin
Hello, This patch extends expand_sse2_mulvxdi3. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Extend expand_sse2_mulvxdi3. -- Thanks, K diff --git a/gcc/config/i386/i386.c b/

[committed] gnu11 fallout: powerpc

2014-10-16 Thread Marek Polacek
Markus reported on IRC that gnu11 default broke these two tests on powerpc. Applying to trunk. 2014-10-16 Marek Polacek * gcc.target/powerpc/pr58673-1.c: Fix defaulting to int. * gcc.target/powerpc/pr58673-2.c: Add declarations. diff --git gcc/testsuite/gcc.target/powerpc/pr5

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Jan Hubicka
> > Hello. > > > > If I recall correctly, we recycle cgraph_nodes and it's possible that an UID > > is given to different nodes: > > symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from > > perspective that it cannot be used as a index to a vector. > > > > It was also Honza's n

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective that it cannot be used as a index to a vector. It was

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:05 PM, Martin Liška wrote: On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective that it c

Re: Check that unlinked uses do not contain ssa-names when renaming.

2014-10-16 Thread Tom de Vries
On 16-10-14 10:14, Richard Biener wrote: On Thu, Oct 16, 2014 at 9:20 AM, Tom de Vries wrote: On 08/10/12 11:24, Richard Guenther wrote: On Sun, Oct 7, 2012 at 12:44 PM, Tom de Vries wrote: Richard, attached patch checks that unlinked uses do not contain ssa-names when renaming. This asser

Re: Check that unlinked uses do not contain ssa-names when renaming.

2014-10-16 Thread Richard Biener
On Thu, Oct 16, 2014 at 2:11 PM, Tom de Vries wrote: > On 16-10-14 10:14, Richard Biener wrote: >> >> On Thu, Oct 16, 2014 at 9:20 AM, Tom de Vries >> wrote: >>> >>> On 08/10/12 11:24, Richard Guenther wrote: On Sun, Oct 7, 2012 at 12:44 PM, Tom de Vries wrote: > > Richard

[SH][committed] Make GBR call preserved by default

2014-10-16 Thread Oleg Endo
Hi, This is not entirely related to PR 59401, but the discussion came up there. The attached patch makes the GBR on SH call preserved by default. Tested by Kaz on sh4-linux, committed as r216314. Cheers, Oleg gcc/ChangeLog: PR target/59401 * config/sh/sh.h (CALL_REALLY_USED_REG

Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.

2014-10-16 Thread Uros Bizjak
On Thu, Oct 16, 2014 at 1:55 PM, Kirill Yukhin wrote: > Hello, > This patch extends expand_sse2_mulvxdi3. > > Bootstrapped. > AVX-512* tests on top of patch-set all pass > under simulator. > > Is it ok for trunk? > > gcc/ > * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Extend >

[SH][committed] Fix typo in PR 63260 testcase

2014-10-16 Thread Oleg Endo
Hi, I've committed the attached obvious patch as r216317. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/63260 * gcc.target/sh/pr63260.c: Fix typo __builtin_fabs vs. __builtin_abs. Index: gcc/testsuite/gcc.target/sh/pr63260.c =

[PATCH v2] Fix pr61848, linux kernel miscompile

2014-10-16 Thread Markus Trippelsdorf
(I've taken Alan's patch and added two new testcases.) This patch cures the linux kernel boot failure when compiled using trunk gcc. At its heart, the problem is caused by merge_decls merging from the old decl to the new decl, then copying back to the old decl and discarding the new. When Jan m

IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Martin Liška
Hello. Following patch fixes i586 bootstrap failure: https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘std::list::size_type {aka unsigned int}’ [-Werro

Re: IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Jan Hubicka
> Hello. > > Following patch fixes i586 bootstrap failure: > https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html > > ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects argument > of type ‘long unsigned int’, but argument 3 has type > ‘std::list::size_type {aka unsigned

Re: IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 02:41:36PM +0200, Martin Liška wrote: > Hello. > > Following patch fixes i586 bootstrap failure: > https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html > > ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects argument > of type ‘long unsigned int’,

Re: IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Martin Liška
On 10/16/2014 02:45 PM, Jakub Jelinek wrote: On Thu, Oct 16, 2014 at 02:41:36PM +0200, Martin Liška wrote: Hello. Following patch fixes i586 bootstrap failure: https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects argum

[SH][committed] Remove function fldi_ok

2014-10-16 Thread Oleg Endo
Hi, The fldi_ok function in sh.c has been returning 'true' for while. Thus it can as well be removed. Tested with 'make all-gcc', committed as r216320. Cheers, Oleg gcc/ChangeLog: * config/sh/sh-protos.h (fldi_ok): Remove. * config/sh/sh.c (fldi_ok): Likewise. (sh_secon

  1   2   >