[PATCH 2/2] Move Asan instrumentation to sanopt pass

2014-08-08 Thread Yury Gribov
Hi all, Attached patch delays generation of Asan memory checking code until sanopt pass. This is a first step towards global static analysis of Asan instrumentation (hope to send it for review next week). The patch also changes the logic behind asan-instrumentation-with-call-threshold

Re: [PATCH testcase]Skip test pr61772.c for lto tests

2014-08-08 Thread Kyrill Tkachov
On 07/08/14 10:43, Bin Cheng wrote: Hi, Case pr61772.c scans specific string in assembly file, and it is run for many different option combinations. When it's tested against different lto option combinations on targets like ARM, the generated pr61772.s may only contain lto object content,

Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins

2014-08-08 Thread Bin.Cheng
On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As analyzed in PR62032, this patch fixes the latent lto bug by switching arguments of lto_define_builtins, otherwise vsnprintf-chk.c would

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

2014-08-08 Thread Jakub Jelinek
On Fri, Aug 08, 2014 at 10:11:30AM +0400, Yury Gribov wrote: commit 22a79d39656d3d600e97c7ae599b86b6d25efe00 Author: Yury Gribov y.gri...@samsung.com Date: Wed Aug 6 11:06:24 2014 +0400 Move inlining of Asan memory checks to sanopt pass. Change

Re: [PATCH testcase]Skip test pr61772.c for lto tests

2014-08-08 Thread Bin.Cheng
On Fri, Aug 8, 2014 at 4:05 PM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: On 07/08/14 10:43, Bin Cheng wrote: Hi, Case pr61772.c scans specific string in assembly file, and it is run for many different option combinations. When it's tested against different lto option combinations on

Re: [C++ Patch] PR 51312

2014-08-08 Thread Paolo Carlini
Hi, On 08/07/2014 07:44 PM, Jason Merrill wrote: On 08/07/2014 12:41 PM, Paolo Carlini wrote: Ok. Probably at some point I should review which kind of diagnostics the various implementations emit: for example *for enum27.C* currently clang talks about *narrowing*, the kind of of diagnostics

Re: [PATCH] Add -ffat-lto-objects to gcc.dg/torture/pr61772.c

2014-08-08 Thread Richard Biener
On Thu, Aug 7, 2014 at 4:58 PM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, This test in the torture suite fails on -flto because it scans for a sentinel string inside an asm block that it wants to make sure is not optimised away. However, with -flto gcc uses slim LTO objects which

Re: [GSoC][match-and-simplify] reject builtin operator as for variable

2014-08-08 Thread Richard Biener
On Fri, Aug 8, 2014 at 12:42 AM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: reject operator to be used as variable in for. eg: (for mult in plus minus) * genmatch.c (get_operator): New function. (e_operation::e_operation): Adjust to call get_operator.

Re: [PATCH] Remove a redundant statement in predict.c

2014-08-08 Thread Richard Biener
On Fri, Aug 8, 2014 at 1:59 AM, Yi Yang ahyan...@google.com wrote: Remove a redundant assignment *predictor = PRED_BUILTIN_EXPECT;, since six lines later *predictor is assigned again. Ok. Thanks, Richard. -- 2014-08-07 Yi Yang ahyan...@google.com gcc: * predict.c

Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins

2014-08-08 Thread Richard Biener
On Fri, Aug 8, 2014 at 10:05 AM, Bin.Cheng amker.ch...@gmail.com wrote: On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng bin.ch...@arm.com wrote: Hi, As analyzed in PR62032, this patch fixes the latent lto bug by

Re: [PATCH lto]Fix the mis-matched arguments of lto_define_builtins

2014-08-08 Thread Bin.Cheng
On Fri, Aug 8, 2014 at 4:54 PM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Aug 8, 2014 at 10:05 AM, Bin.Cheng amker.ch...@gmail.com wrote: On Thu, Aug 7, 2014 at 8:06 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Aug 7, 2014 at 11:46 AM, Bin Cheng bin.ch...@arm.com

[GSoC][match-and-simplify] put check for EOF

2014-08-08 Thread Prathamesh Kulkarni
Put check for EOF in parse_for and parse_if, else it results in segmentation fault. eg: (if (0) eof Not sure why it segfaults. I got following back-trace (in gdb): #0 _cpp_lex_direct (pfile=pfile@entry=0x66f560) at ../../src/libcpp/lex.c:2183 #1 0x0041d50c in _cpp_lex_token

RE: [PATCH, i386] Add RDRND and MOVBE for AMD bdver4

2014-08-08 Thread Gopalasubramanian, Ganesh
OK for mainline. Thanks Uros. Committed to revision 213572 I would like to backport to 4.9 branch too. Is it OK? - Ganesh

Re: [PATCH Fortran/Diagnostics] Move Fortran to common diagnostics machinery

2014-08-08 Thread Dodji Seketeli
Hello Manuel, Manuel López-Ibáñez lopeziba...@gmail.com writes: 2014-08-03 Manuel López-Ibáñez m...@gcc.gnu.org PR fortran/44054 c-family/ * c-format.c: Handle Fortran flags. * diagnostic.c (build_message_string): Make it extern. * diagnostic.h (build_message_string):

Re: [PATCH] Asan static optimization (draft)

2014-08-08 Thread Jakub Jelinek
On Fri, Aug 08, 2014 at 02:26:25PM +0400, Yury Gribov wrote: I have been working on Asan global optimization pass lately. The goal is to remove redundant Asan checks from sanitized code. This should hopefully reduce Asan's speed/size overhead (which is currently ~2x). The patch is not yet

Re: [testsuite patch] check before using -mthumb in 5 arm tests

2014-08-08 Thread Richard Earnshaw
On 08/08/14 01:31, Janis Johnson wrote: Five tests in gcc.target/arm add -mthumb without first checking that the option is compatible with the current multilib flags. This patch fixes that by skipping each test if neither arm_thumb1_ok or arm_thumb2_ok is true. Tested by running

Re: [PATCH] Asan static optimization (draft)

2014-08-08 Thread Dmitry Vyukov
On Fri, Aug 8, 2014 at 2:37 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Aug 08, 2014 at 02:26:25PM +0400, Yury Gribov wrote: I have been working on Asan global optimization pass lately. The goal is to remove redundant Asan checks from sanitized code. This should hopefully reduce Asan's

Re: [PATCH][committed] Remove arm-specific -march option in gcc.dg/pr61756.c

2014-08-08 Thread Kyrill Tkachov
On 07/08/14 09:46, Kyrill Tkachov wrote: Hi all, As Bin pointed out, setting -march=armv5 explicitly on this test causing a FAIL when testing with /-mthumb. The bug fixed by the commit that added this test occured only on pre-SMP architectures, i.e. ARMv5 and earlier. I think it's best to

Re: [PATCH, i386] Add RDRND and MOVBE for AMD bdver4

2014-08-08 Thread Uros Bizjak
On Fri, Aug 8, 2014 at 12:14 PM, Gopalasubramanian, Ganesh ganesh.gopalasubraman...@amd.com wrote: OK for mainline. Thanks Uros. Committed to revision 213572 I would like to backport to 4.9 branch too. Is it OK? Yes, looks safe for backport. Thanks, Uros.

[match-and-simplify] Merge from trunk

2014-08-08 Thread Richard Biener
Bootstrapped on x86_64-unknown-linux-gnu. Richard. 2014-08-08 Richard Biener rguent...@suse.de Merge from trunk r213455 through r213753.

Fix if-conversion pass for dead type-unsafe code

2014-08-08 Thread Tom de Vries
Steven, this patch fixes: - PR62004 (the if-conversion pass part, the tail-merge part is still todo), and - PR62030. In both cases, a valid program with a dead type-unsafe access is transformed by the if-conversion pass into an invalid program with a live type-unsafe access. The

Re: Fix if-conversion pass for dead type-unsafe code

2014-08-08 Thread Richard Biener
On Fri, 8 Aug 2014, Tom de Vries wrote: Steven, this patch fixes: - PR62004 (the if-conversion pass part, the tail-merge part is still todo), and - PR62030. In both cases, a valid program with a dead type-unsafe access is transformed by the if-conversion pass into an invalid program

Re: [PATCH i386 AVX512] [1/n] Introduce `-mavx512dq' switch

2014-08-08 Thread Kirill Yukhin
On 30 Jul 10:50, Uros Bizjak wrote: (Please take care not to break bootstrap after every part, so the source will always be bisectable). Sure, that is the plan. -- Thanks, K

[PATCH][LTO] Merge another part of the streamer reorg

2014-08-08 Thread Richard Biener
This merges making lto_input_block a class, getting rid of LTO_INIT_INPUT_BLOCK. It also simplifies lto headers by removing unused and write-only fields and making them a inheritance hierarchy. LTO bootstrap running on x86_64-unknown-linux-gnu. Richard. 2014-08-08 Richard Biener

Re: [GSoC][match-and-simplify] put check for EOF

2014-08-08 Thread Richard Biener
On Fri, Aug 8, 2014 at 11:50 AM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Put check for EOF in parse_for and parse_if, else it results in segmentation fault. eg: (if (0) eof Not sure why it segfaults. Hmm, I think this is a bug in libcpp which seems to crash when you do

Re: [PATCH 5/5] add libcc1 [gcc-5/changes.html]

2014-08-08 Thread Jan Kratochvil
On Tue, 05 Aug 2014 21:34:00 +0200, Tom Tromey wrote: Jeff == Jeff Law l...@redhat.com writes: Jeff Does this deserve a mention in the news file? I suppose so, I will get someone here to write it. Attached (based on Tom's PATCH 0/5 mail). Jan Index: htdocs/gcc-5/changes.html

[PATCH i386 AVX512] [2/n] Introduce `-mavx512bw' switch

2014-08-08 Thread Kirill Yukhin
Hello, This patch introduces `-mavx512bw' compiler switch. Bootstrapped. gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512BW_SET) : Define. (OPTION_MASK_ISA_AVX512BW_UNSET): Ditto. (OPTION_MASK_ISA_AVX512VL_UNSET) : Ditto.

[PATCH i386 AVX512] [3/n] Introduce `-mavx512vl' switch

2014-08-08 Thread Kirill Yukhin
Hello, This patch introduces `-mavx512vl' option to GCC Bootstrapped. gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VL_SET): Define. (OPTION_MASK_ISA_AVX512F_UNSET): Update. (ix86_handle_option): Handle OPT_mavx512vl. * config/i386/cpuid.h

Re: [GSoC] Elimination of CLooG library installation dependency

2014-08-08 Thread Roman Gareev
I think this is fine. On the other side, I think the test case itself is unnecessarily large. I would assume the majority of the code could be deleted while still triggering the bug. Could you give it a shot. I've attached an improved version of the patch. Is there anything else you still

Re: [GSoC] Elimination of CLooG library installation dependency

2014-08-08 Thread Tobias Grosser
On 08/08/2014 15:11, Roman Gareev wrote: I think this is fine. On the other side, I think the test case itself is unnecessarily large. I would assume the majority of the code could be deleted while still triggering the bug. Could you give it a shot. I've attached an improved version of the

Re: [C++ Patch] PR 51312

2014-08-08 Thread Jason Merrill
On 08/08/2014 06:03 AM, Paolo Carlini wrote: Note - in fact I noticed this some days ago - that probably the idea of passing complain to check_narrowing is good anyway, otherwise we have a function emitting unconditional warnings called by functions which have a tsubst_flags_t. Makes sense.

Re: Fix if-conversion pass for dead type-unsafe code

2014-08-08 Thread Tom de Vries
On 08-08-14 13:36, Richard Biener wrote: On Fri, 8 Aug 2014, Tom de Vries wrote: Steven, this patch fixes: - PR62004 (the if-conversion pass part, the tail-merge part is still todo), and - PR62030. In both cases, a valid program with a dead type-unsafe access is transformed by the

Re: [PATCH, ARM] Keep constants in register when expanding

2014-08-08 Thread Ramana Radhakrishnan
On Tue, Aug 5, 2014 at 10:31 AM, Zhenqiang Chen zhenqiang.c...@linaro.org wrote: Hi, For some large constants, ARM will split them during expanding, which makes impossible to hoist them out the loop or shared by different references (refer the test case in the patch). The patch keeps some

[PATCH mips] Pass -msoft-float/-mhard-float flags to GAS

2014-08-08 Thread Steve Ellcey
Recent changes to the MIPS binutils sources have made it necessary for GCC to pass the -msoft-float to the assembler if it wants an object file marked as soft-float. This patch makes GCC pass any -mhard-float, or -msoft-float flags that were used on the compile line on to the assembler so the

[PATCH mips] Do not compile mips16.S in soft-float mode

2014-08-08 Thread Steve Ellcey
This libgcc patch is the second of two patches needed to build GCC soft-float multilibs when using the latest binutils. It skips assembling any of the code in mips16.S when in soft-float mode because the code is not used when in soft-float mode and because doing so generates errors during

Re: [C++ Patch] PR 51312

2014-08-08 Thread Paolo Carlini
Hi, On 08/08/2014 03:55 PM, Jason Merrill wrote: On 08/08/2014 06:03 AM, Paolo Carlini wrote: Note - in fact I noticed this some days ago - that probably the idea of passing complain to check_narrowing is good anyway, otherwise we have a function emitting unconditional warnings called by

Re: [PATCH powerpc64] Add a new constraint to insn movdi_internal64

2014-08-08 Thread Carrot Wei
Thank you for the comment, I've updated the patch. OK for trunk and 4.9 branch? 2014-08-08 Guozhi Wei car...@google.com * config/rs6000/rs6000.md (*movdi_internal64): Add a new constraint. On Wed, Aug 6, 2014 at 7:28 PM, Segher Boessenkool seg...@kernel.crashing.org wrote: On Wed,

Re: [PATCH][AArch64][tests]Skip graphite tests that don't fit -mcmodel=tiny

2014-08-08 Thread Mike Stump
On Aug 7, 2014, at 1:38 AM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Thanks for the detailed explanation, the linker errors I was seeing were about relocations being truncated. Ah, those are bugs in your port! You should be able to generate large code and then relax it into short small

Re: [PATCH][testsuite] Don't run cproj-fails-with-broken-glibc.c for broken glibc

2014-08-08 Thread Mike Stump
On Aug 7, 2014, at 12:47 AM, Tom de Vries tom_devr...@mentor.com wrote: Done. Committed as attached. Thanks.

Re: [C++ Patch] PR 51312

2014-08-08 Thread Jason Merrill
On 08/08/2014 01:04 PM, Paolo Carlini wrote: -float d = { i }; +float d = { i }; // { dg-error narrowing } No, this case is the entire point of -Wno-narrowing. I was suggesting that we ignore -Wno-narrowing *for a constant value*, but i is not a constant-expression. Jason

Re: patch to fix a wrong code generation with LRA when SDmode is used on ppc.

2014-08-08 Thread David Edelsohn
Hi, Vlad Why does rs6000_emit_move need special support for SDmode with LRA and not with reload? In other words, why is this a specific fix for rs6000 instead of a general improvement for reload? SDmode has some bizarre restrictions on PPC, but one of the historical advantages of GCC was

Re: [PATCH powerpc64] Add a new constraint to insn movdi_internal64

2014-08-08 Thread David Edelsohn
On Fri, Aug 8, 2014 at 1:50 PM, Carrot Wei car...@google.com wrote: Thank you for the comment, I've updated the patch. OK for trunk and 4.9 branch? 2014-08-08 Guozhi Wei car...@google.com * config/rs6000/rs6000.md (*movdi_internal64): Add a new constraint. On Wed, Aug 6, 2014

[jit] Implement function pointers

2014-08-08 Thread David Malcolm
Committed to branch dmalcolm/jit: This adds two public API entrypoints: gcc_jit_context_new_function_ptr_type gcc_jit_context_new_call_through_ptr gcc/jit/ * TODO.rst: Function ptrs are done. * internal-api.c (gcc::jit::recording::context::new_function_ptr_type): New

Re: [PATCH], rs6000 cleanup, make constraints tighter

2014-08-08 Thread David Edelsohn
On Thu, Aug 7, 2014 at 2:41 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: I'm starting to look at updating my old address branch with an eye towards getting the changes committed in GCC 4.10. The address branch is meant to rewrite handling of addresses in the rs6000 backend, to

[jit] Fix missing tests within test-combination.c

2014-08-08 Thread David Malcolm
Committed to branch dmalcolm/jit: test-combination.c attempts to run all tests within one context, but was missing a couple of them. Add the missing tests. gcc/testsuite/ * jit.dg/test-combination.c (create_code): Add missing calls to create_code_quadratic and

[PATCH mips] Remove fp64 multilibs from mips-mti-* targets.

2014-08-08 Thread Steve Ellcey
Here is another MIPS patch. This removes the fp64 multilib from the mips-mti-* targets. With the new fpxx we no longer want special fp64 multilibs in the mti targets. Since it doesn't affect any other targets hopefully there is no objection to checking this in. Tested on mips-mti-linux-gnu and

[jit] Add support for unions

2014-08-08 Thread David Malcolm
Pushed to branch dmalcolm/jit: This adds a new API entrypoint: gcc_jit_context_new_union_type gcc/jit/ * libgccjit.h (gcc_jit_context_new_union_type): New entrypoint. (gcc_jit_lvalue_access_field): Rename first param from struct_ to struct_or_union.

Re: [C++ Patch] PR 51312

2014-08-08 Thread Jason Merrill
On 08/08/2014 04:52 PM, Paolo Carlini wrote: + else if (!TREE_CONSTANT (init)) + { + if (complain tf_warning_or_error) + pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, +narrowing conversion of %qE from %qT to %qT inside { }, +

Re: patch to fix a wrong code generation with LRA when SDmode is used on ppc.

2014-08-08 Thread Vladimir Makarov
On 2014-08-08, 2:53 PM, David Edelsohn wrote: Hi, Vlad Why does rs6000_emit_move need special support for SDmode with LRA and not with reload? rs6000_emit_move has also special SDmode support for *reload too*. It is not implemented generically in reload as you wrote. Please, look at the

[google/gcc-4_9] Remove skeleton type units that were being produced with -gsplit-dwarf.

2014-08-08 Thread Cary Coutant
I've backported this patch from trunk r213765. These sections were originally intended as targets for .gdb_index entries that needed to point to type units. Because of the limitations of the .debug_gnu_pubnames/pubtypes sections with split DWARF, we were not able to pass along enough information

Re: [PATCH] libstdc++: add uniform on sphere distribution

2014-08-08 Thread Ulrich Drepper
Jonathan Wakely jwak...@redhat.com writes: On 23/07/14 11:58 +0200, Marc Glisse wrote: As an aside, we already have divide-by-zero bugs in ext/random, it would be nice if someone could look at that. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60037 Sorry, it took a while to get back to

Re: [C++ Patch] PR 51312

2014-08-08 Thread Paolo Carlini
Hi, On 08/08/2014 11:18 PM, Jason Merrill wrote: On 08/08/2014 04:52 PM, Paolo Carlini wrote: + else if (!TREE_CONSTANT (init)) +{ + if (complain tf_warning_or_error) +pedwarn (EXPR_LOC_OR_LOC (init, input_location), OPT_Wnarrowing, + narrowing conversion

Re: [C++ Patch] PR 51312

2014-08-08 Thread Paolo Carlini
.. by^2 the way, I think c++/57460 my have something to do with my curiosities about non-constant vs SFINAE... Paolo.

Re: [C++ Patch] PR 51312

2014-08-08 Thread Jason Merrill
On 08/08/2014 07:26 PM, Paolo Carlini wrote: Ok (that seems a latent buglet...). By the way, since I wondered briefly about SFINAE wrt the existing documentation, does what we do in the *non* constant case really matter for SFINAE? Yes; in unevaluated context, at least. Anyway, Ok if testing

[middle-end/PATCH 0/2] Fix AARCH64 ILP32 ld.so miscompiling

2014-08-08 Thread Andrew Pinski
The problem is that HJL's patch in 2011 to try and fix his miscompiling of x32 ld.so was in fact incorrect and causes problems with AARCH64 ILP32. The testcase which is being miscompiled after HJL's patch (which he was also trying to fix up with his patch on x32): void f(int *a, int b, long long

[PATCH 2/2] Fix ILP32 ld.so.

2014-08-08 Thread Andrew Pinski
This patch fixes the original problem that HJL was having with x32 in PR 47727, it is more constraint than HJL's patch only care about what is happening inside a CONST; if we allow it for other cases, the RTL and generated code is incorrect as it does not have the needed zero extend. This allows

[PATCH 1/2] Revert PR49721's patch

2014-08-08 Thread Andrew Pinski
OK? When the second patch is approved? Thanks, Andrew Pinski ChangeLog: Revert: 2011-08-19 H.J. Lu hongjiu...@intel.com PR middle-end/49721 * explow.c (convert_memory_address_addr_space): Also permute the conversion and addition of constant for

[PATCH 1/2] Add -B support to gcc-ar/ranlib/nm

2014-08-08 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com To use gcc-{ar,ranlib} for boot strap we need to add a -B option to the tool. Since ar has weird and unusual argument conventions implement the code by hand instead of using any libraries. v2: Fix typo gcc/: 2014-08-04 Andi Kleen a...@linux.intel.com

[PATCH 2/2] Support slim LTO bootstrap

2014-08-08 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com Change the bootstrap-lto config file to use slim (non fat) LTO.. Speeds up the LTO bootstrap by ~18% on a 4 core system. This requires using gcc-ar/ranlib in post stage 1 builds, so these are passed to all sub builds. v2: Change existing config file as

[PATCH] Fix for PR62037

2014-08-08 Thread Felix Yang
Attached please find the patch and testcase for PR62037. DEF1 can be a GIMPLE_NOP and gimple_bb will be NULL then. The patch checks for that. Bootstrapped on x86_64-suse-linux. OK for trunk? Please commit this patch if it's OK. Index: gcc/ChangeLog

Re: Fix if-conversion pass for dead type-unsafe code

2014-08-08 Thread Tom de Vries
On 08-08-14 17:17, Tom de Vries wrote: Maybe instead of a new mem_alias_equal_p simply compare MEM_ATTRs with mem_attrs_eq_p? I propose to fix it this way (as attached) on 4.8/4.9/trunk, and maybe do a more efficient handling on trunk as a follow-up patch. I'll put this through bootstrap/test