Re: Request to merge Undefined Behavior Sanitizer in (take 2)

2013-08-15 Thread Marek Polacek
Ping. On Wed, Aug 07, 2013 at 06:12:58PM +0200, Marek Polacek wrote: On Wed, Aug 07, 2013 at 10:24:59AM -0400, Jason Merrill wrote: On 08/07/2013 06:06 AM, Marek Polacek wrote: I might've misunderstood what you mean. If we drop the hunk above, then we'll call error (%q+E is not a

Re: [PATCH, gcc-4_8-branch] Fix the issue of incorrectly using #ifdef HAVE_ATTR_enabled

2013-08-15 Thread Chung-Ju Wu
2013/8/15 Jakub Jelinek ja...@redhat.com: On Thu, Aug 15, 2013 at 04:09:18AM +0800, Chung-Ju Wu wrote: According to this discussion thread: http://gcc.gnu.org/ml/gcc/2013-08/msg00142.html The bug that David mentioned has been fixed on trunk but not on 4.8 branch. IMHO it would be a good idea

Re: [PATCH] Redesign pthread in LIB_SPEC for systems without libpthread

2013-08-15 Thread Alexander Ivchenko
Could anybody please take a look? This is important for building gcc for android. ping^4 thanks, Alexander 2013/8/15 Alexander Ivchenko aivch...@gmail.com: Could anybody please take a look? This is important for building gcc for android. ping^4 thanks, Alexander 2013/5/28 Pavel Chupin

Re: Request to merge Undefined Behavior Sanitizer in (take 2)

2013-08-15 Thread Marek Polacek
On Wed, Aug 07, 2013 at 04:58:03PM +0200, Marek Polacek wrote: I actually don't know what I prefer more, but if you like this version more, I'll go with it. Maybe this is better because we don't have to create SAVE_EXPR and also we avoid one fold_build call. Thanks, Not creating the

[PATCH,ARM] fix testsuite failures for arm-none-linux-gnueabihf

2013-08-15 Thread Charles Baylis
Hi The attached patch fixes some tests which fail when testing gcc for a arm-none-linux-gnueabihf target because they do not expect to be built with a hard float ABI. The change in target-supports.exp fixes arm-fp16-ops-5.c and arm-fp16-ops-6.c. Tested on arm-none-linux-gnueabihf using

Request to merge Undefined Behavior Sanitizer in (take 3)

2013-08-15 Thread Marek Polacek
I've fixed a few unpleasant bugs; mainly the bug that introduced various uninitialized variable warnings was bothersome. Now it is possible to do bootstrap with -fsanitize=undefined, even though there are some comparison failures at the end. v3: - Fix Wuninitialized warnings because of

RE: [PATCH,ARM] fix testsuite failures for arm-none-linux-gnueabihf

2013-08-15 Thread Kyrylo Tkachov
Hi Charles, CC'ing some of the ARM maintainers... Hi The attached patch fixes some tests which fail when testing gcc for a arm-none-linux-gnueabihf target because they do not expect to be built with a hard float ABI. The change in target-supports.exp fixes arm-fp16-ops-5.c and arm-fp16-

Re: Request to merge Undefined Behavior Sanitizer in (take 2)

2013-08-15 Thread Jason Merrill
OK. Jason

Re: Request to merge Undefined Behavior Sanitizer in (take 2)

2013-08-15 Thread Jason Merrill
On 08/15/2013 07:04 AM, Marek Polacek wrote: if any of the operands is wrapped in SAVE_EXPR, we get an -Wuninitialized warning. So, what I did is to evaluate the op0 always in the condition, like if (op0, cond), which is safe and all the uninitialized warnings are gone, That sounds fine.

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Jan Hubicka
On 08/14/2013 02:14 AM, Jan Hubicka wrote: As a temporary hack I suppose I can rely on assembler name of virtual table to be unique for each templated class? Actually, that seems like a fine solution for devirtualization; just compare the mangled name of the vtable to establish type

Fix class type lookup from OBJ_TYPE_REF

2013-08-15 Thread Jan Hubicka
Hi, while working on the devirt code, I noticed that sometimes we get as a type of object a non-classes (like void types). This is because we look up object's class from the OBJ_TYPE_REF_OBJECT and this is a generic pointer that gimple passes like to change type of. I tracked down few cases. For

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Xinliang David Li
Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; 2) add statistics dump -- average size of a hierarchy subgraph 3) Dump the graph using top-order -- starting from

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Jan Hubicka
Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; OK, can add that. 2) add statistics dump -- average size of a hierarchy subgraph 3) Dump the graph using

[Google] X86_TUNE_USE_VECTOR_CONVERTS adjustment

2013-08-15 Thread Wei Mi
Turning off X86_TUNE_USE_VECTOR_CONVERTS uses cvtss2sd instead of unpcklps+cvtps2pd, which is better for some recent intel micro arch such as westmere and sandybridge. So turn it off for m_GENERIC and m_CORE_ALL. regression and bootstrap ok. ok for 4.8 branch? Index: config/i386/i386.c

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Xinliang David Li
On Thu, Aug 15, 2013 at 9:46 AM, Jan Hubicka hubi...@ucw.cz wrote: Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; OK, can add that. 2) add statistics dump --

Re: [Google] X86_TUNE_USE_VECTOR_CONVERTS adjustment

2013-08-15 Thread Xinliang David Li
yes. thanks, David On Thu, Aug 15, 2013 at 9:50 AM, Wei Mi w...@google.com wrote: Turning off X86_TUNE_USE_VECTOR_CONVERTS uses cvtss2sd instead of unpcklps+cvtps2pd, which is better for some recent intel micro arch such as westmere and sandybridge. So turn it off for m_GENERIC and

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Jan Hubicka
On Thu, Aug 15, 2013 at 9:46 AM, Jan Hubicka hubi...@ucw.cz wrote: Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; OK, can add that. 2) add statistics

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Jan Hubicka
Currently my type graph is very partial - I have no nodes for types without virtual methods at all. Those are not probably interesting anyways. Forgot to mention, I think in longer term we can use it to maintain more of C++ type based aliasing rules. Currently we unify canonical types only

Re: [Ping^4] [Patch, AArch64, ILP32] 3/5 Minor change in function.c:assign_parm_find_data_types()

2013-08-15 Thread Yufeng Zhang
Ping^4~ I am aware that it is currently holiday season, but it would be really nice if this tiny patch can get some further comments even if it is not an approval. The original RFA email is here: http://gcc.gnu.org/ml/gcc-patches/2013-06/msg01485.html Regards, Yufeng On 07/18/13 11:28,

Re: Fix class type lookup from OBJ_TYPE_REF

2013-08-15 Thread Richard Biener
Jan Hubicka hubi...@ucw.cz wrote: Hi, while working on the devirt code, I noticed that sometimes we get as a type of object a non-classes (like void types). This is because we look up object's class from the OBJ_TYPE_REF_OBJECT and this is a generic pointer that gimple passes like to change type

[PATCH] Fix tree-call-cdce.c (PR tree-optimization/58165)

2013-08-15 Thread Jakub Jelinek
Hi! On the following testcase we ICE because the builtin fn prototype doesn't have throw () on it (glibc headers provide it, but some other C libraries apparently don't) and thus we can have EH edges out of the builtin, and call-cdce unconditionally split the block, leaving EH edge from an empty

[PATCH] Fix ICEs with bogus computed goto (PR tree-optimization/58164)

2013-08-15 Thread Jakub Jelinek
Hi! gimple_goto_dest is is_gimple_val, so can be ADDR_EXPR (though just for bad testcases), and in that case we weren't walking it in some cases. I've tried to reject ADDR_EXPRs in gimple_goto_dest, but that turned out to be much larger patch and still incomplete. Bootstrapped/regtested on

Re: [patch, Fortran] PR 58146, enable array slice compile-time bounds checking

2013-08-15 Thread Dominique Dhumieres
Thomas, The two lines gfc_actual_arglist *args1; gfc_actual_arglist *args2; in gfc_dep_compare_expr must be removed. Otherwise the compilation aborts with .../../work/gcc/fortran/dependency.c: In function 'int gfc_dep_compare_expr(gfc_expr*, gfc_expr*)':

Re: [Patch, Fortran] PR 58099: [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking

2013-08-15 Thread Janus Weil
Hi Mikael, here is a small regression-fix patch for a problem with procedure pointers and the PURE attribute, for details see the PR. In essence: gfc_compare_interfaces is asymmetric in the two interfaces it compares (e.g. regarding the PURE attribute), and we must not symmetrize it by

[PATCH] Fix bad interaction between GTY((user)) and incomplete declarations

2013-08-15 Thread David Malcolm
There is a bug in gengtype's handling of types marked with GTY((user)) which can lead to gtype-desc.c containing broken test-and-mark functions that fail to call the user-provided traversal functions, leading to segfaults. If the type is first encountered as an incomplete type declaration:

Re: [PATCH] Redesign pthread in LIB_SPEC for systems without libpthread

2013-08-15 Thread Maxim Kuvyrkov
On 15/08/2013, at 10:49 PM, Alexander Ivchenko wrote: Could anybody please take a look? This is important for building gcc for android. ping^4 [Sorry for being cranky] There is a reason why people are ignoring your patch -- the submission is not very well structured. First, the subject

Re: [PATCH, powerpc] PR 58160 -- fix power8 gpr load fusion to be safer

2013-08-15 Thread David Edelsohn
On Wed, Aug 14, 2013 at 6:55 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: In running the spec 2006 testsuite with several options, we discovered that -mtune=power8 (which turns on the -mpower8-fusion option) has a segmentation fault in two benchmarks: 403.gcc when built with -O2

Re: Two regex testcases failing for check-debug

2013-08-15 Thread Tim Shen
On Thu, Aug 15, 2013 at 5:53 PM, Jonathan Wakely jwakely@gmail.com wrote: Why not use __s.data() in all cases, instead of *__s.begin()? That's safe even for an empty vector. Thanks, I didn't notice that vector's data() is mutable(since string's is not). Bootstrap Passed, and testsuites

[PATCH 0/2] Port symtab/cgraph/varpool nodes to use C++ inheritance

2013-08-15 Thread David Malcolm
Honza: following up from our IRC chat, I've ported the symtab, cgraph and varpool nodes from the current hand-coded inheritance-in-C scheme to being a C+ class hierarchy. I know you're in the middle of making lots of other changes to this code, so I've written a script to automate the parts of

[PATCH 1/2] Convert symtab, cgraph and varpool nodes into a real class hierarchy

2013-08-15 Thread David Malcolm
This patch is the handwritten part of the conversion of these types to C++; it requires the followup patch, which is autogenerated. It converts: struct GTY(()) symtab_node_base to: class GTY((user)) symtab_node_base and converts: struct GTY(()) cgraph_node to: struct GTY((user))

[PATCH 2/2] Autogenerated fixes of -symbol. to -

2013-08-15 Thread David Malcolm
This patch is 384KB in size, so to avoid exceeding mailing list limits I've uploaded it to: http://dmalcolm.fedorapeople.org/gcc/large-patches/6a680b99445e0a734f9270150534bb5b2bd77cdf-0002-Autogenerated-fixes-of-symbol.-to.patch The following is just the proposed ChangeLog entry and the

Re: [PATCH] Fix bad interaction between GTY((user)) and incomplete declarations

2013-08-15 Thread Laurynas Biveinis
* gengtype.c (create_user_defined_type): Ensure that the kind is set to TYPE_USER_STRUCT, fixing a bug seen when an incomplete declaration is seen before the GTY((user)) marking. This is OK, thank you. -- Laurynas