Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs

2014-06-19 Thread Jakub Jelinek
Hi! On Thu, Jun 19, 2014 at 04:56:53PM +0200, Marek Polacek wrote: Thanks for working on this. --- gcc/asan.c +++ gcc/asan.c @@ -2761,6 +2761,9 @@ pass_sanopt::execute (function *fun) case IFN_UBSAN_NULL: ubsan_expand_null_ifn (gsi); break; +

Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs

2014-06-19 Thread Jakub Jelinek
On Thu, Jun 19, 2014 at 04:56:53PM +0200, Marek Polacek wrote: + /* Don't instrument this FMA-like array in non-strict Also, please don't use FMA to mean flexible member array, it is flexible array member, but more importantly, FMA is used for fused multiply-add, so IMHO it is better to

Re: [PATCH 5/5] add libcc1

2014-06-19 Thread Jakub Jelinek
On Thu, Jun 19, 2014 at 02:52:12PM -0600, Tom Tromey wrote: Tom I've edited this one down by removing the auto-generated stuff , and Tom then compressed it. Here's a new version of patch #5. I've removed the generated code; let's see if it gets through without compression. I think this

Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 10:43:04AM +0200, Marek Polacek wrote: + +/* Internal function code. */ +ENUM_BITFIELD(internal_fn) ifn : 5; Any reason for the : 5 here? I mean, the union also contains unsigned int, so it doesn't hurt if you use full 32 bits for it there, and it should be

Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 11:34:26AM +0200, Marek Polacek wrote: On Fri, Jun 20, 2014 at 10:57:47AM +0200, Jakub Jelinek wrote: On Fri, Jun 20, 2014 at 10:43:04AM +0200, Marek Polacek wrote: + +/* Internal function code. */ +ENUM_BITFIELD(internal_fn) ifn : 5; Any reason

Re: [PATCH] Fix ICE in Asan

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 02:04:25PM +0400, Maxim Ostapenko wrote: This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61530. Tested on x86_64-unknown-linux-gnu, no regressions. Ok to commit? -Maxim gcc/ChangeLog: 2014-06-20 Yury Gribov y.gri...@samsung.com

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

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 02:49:12PM +0400, Maxim Ostapenko wrote: This patch fixes invalid sanitization of trailing byte in __builtin_strlen ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61547). Tested on x86_64-unknown-linux-gnu, no regressions. + +#include sanitizer/asan_interface.h +

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

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 04:55:43PM +0400, Maxim Ostapenko wrote: What about bootstrap though? Bootstrap in progress. +__SIZE_TYPE__ strlen (const char *p) { + /* Simulate error */ + if (p == a) +return 1; Why this? Can't you instead just use

Re: [PATCH] Fix arrays in rtx.u + add minor rtx verification

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 07:36:41PM +0200, Marek Polacek wrote: 2014-06-20 Marek Polacek pola...@redhat.com * genpreds.c (verify_rtx_codes): New function. (main): Call it. * rtl.h (RTX_FLD_WIDTH, RTX_HWINT_WIDTH): Define. (struct rtx_def): Use them. Note, e.g.

Re: [PATCH] Fix arrays in rtx.u + add minor rtx verification

2014-06-20 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 01:55:41PM -0600, Jeff Law wrote: like spot. Most RTLs are allocated through rtx_alloc and the size is determined from RTX_HDR_SIZE (i.e. offsetof) and/or RTX_CODE_SIZE, so your rtl.h change IMHO shouldn't affect anything but make the expmed.c init_expmed_rtl structure

Re: [Committed] [PATCH] PR61123 : Fix the ABI mis-matching error caused by LTO

2014-06-20 Thread Jakub Jelinek
it into gcc.dg/lto and just using arm*-*-* target selector might be better. 2014-06-20 Jakub Jelinek ja...@redhat.com * gcc.target/arm/lto/lto.exp: Exit immediately if not arm*-*-* target. --- gcc/testsuite/gcc.target/arm/lto/lto.exp.jj 2014-06-20 08:02:50.0 +0200 +++ gcc

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

2014-06-20 Thread Jakub Jelinek
-march=native gives -march=pentium-m. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.9? 2014-06-20 Jakub Jelinek ja...@redhat.com PR target/61570 * config/i386/driver-i386.c (host_detect_local_cpu): For unknown model family 6 CPU

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

2014-06-21 Thread Jakub Jelinek
On Fri, Jun 20, 2014 at 03:22:52PM -0700, H.J. Lu wrote: On Fri, Jun 20, 2014 at 2:42 PM, Jakub Jelinek ja...@redhat.com 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

Re: calloc = malloc + memset

2014-06-23 Thread Jakub Jelinek
On Tue, Jun 03, 2014 at 04:00:17PM +0200, Marc Glisse wrote: Ping? Ok for trunk, sorry for the delay. Jakub

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 10:18:16AM +0200, Richard Biener wrote: --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1741,6 +1741,8 @@ find_bswap_1 (gimple stmt, struct symbolic_number *n, int limit) if (n-size % BITS_PER_UNIT != 0) return NULL_TREE;

Re: [PATCH] Fix PR61375: cancel bswap optimization when value doesn't fit in a HOST_WIDE_INT

2014-06-23 Thread Jakub Jelinek
On Mon, Jun 23, 2014 at 04:50:49PM +0800, Thomas Preud'homme wrote: Sent: Monday, June 23, 2014 4:37 PM On Mon, Jun 23, 2014 at 10:18:16AM +0200, Richard Biener wrote: --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1741,6 +1741,8 @@ find_bswap_1 (gimple stmt,

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

2014-06-23 Thread Jakub Jelinek
On Sat, Jun 21, 2014 at 10:28:41AM +0200, Tobias Burnus wrote: Jakub Jelinek wrote: Bootstrap/regtest pending, does this look ok? Except for the module/resolved issues discussed elsewhere, it look good to me. So, either we need something like the following patch (incremental), or another

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 paolo.carl...@oracle.com * sanitizer_common/sanitizer_common_interceptors.inc: Cherry pick upstream r211008. Sure, thanks. Index:

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] Fix OpenMP lastprivate and linear clause handling and handling of collapse 1 simd loops

2014-06-24 Thread Jakub Jelinek
Hi! This patch fixes various issues with handling lastprivate and linear clauses and simd collapse 1 loops. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk and 4.9 branch. 2014-06-24 Jakub Jelinek ja...@redhat.com * gimplify.c (gimplify_omp_for

Re: [PATCH 1/2] Enable setting sign and unsigned promoted mode (SPR_SIGNED_AND_UNSIGNED)

2014-06-24 Thread Jakub Jelinek
On Tue, Jun 24, 2014 at 09:51:51PM +1000, Kugan wrote: Changes the the SUBREG flags to be able to set promoted for sign (SRP_SIGNED), unsigned (SRP_UNSIGNED), sign and unsigned (SPR_SIGNED_AND_UNSIGNED) in SUBREG_PROMOTED_VAR_P. 2014-06-24 Kugan Vivekanandarajah kug...@linaro.org

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-06-24 Thread Jakub Jelinek
On Tue, Jun 24, 2014 at 09:53:35PM +1000, Kugan wrote: 2014-06-24 Kugan Vivekanandarajah kug...@linaro.org * gcc/calls.c (precompute_arguments: Check is_promoted_for_type and set the promoted mode. (is_promoted_for_type) : New function. (expand_expr_real_1) : Check

Re: [PATCH 1/2] Enable setting sign and unsigned promoted mode (SPR_SIGNED_AND_UNSIGNED)

2014-06-25 Thread Jakub Jelinek
On Wed, Jun 25, 2014 at 05:21:08PM +1000, Kugan wrote: The problem with SRP_POINTER 0, SRP_SIGNED 1, SRP_UNSIGNED 2, SRP_SIGNED_AND_UNSIGNED 3 (as I understand) is that, it will be incompatible with TYPE_UNSIGNED (tree) and defines of POINTER_EXTEND_UNSIGNED values. We will have to then

Re: [PATCH 2/2] Enable elimination of zext/sext

2014-06-25 Thread Jakub Jelinek
On Wed, Jun 25, 2014 at 06:14:57PM +1000, Kugan wrote: For these flags, value ranges generated are not usable for extension eliminations. Therefore, without this some of the test cases in regression fails. For example: short a; void foo (void) { for (a = 0; a = 0; a++) ; } -Os

Re: [PATCH] Change default for --param allow-...-data-races to off

2014-06-25 Thread Jakub Jelinek
On Wed, Jun 25, 2014 at 10:14:17AM +0200, Richard Biener wrote: Perhaps not unsurprisingly, the patch is very similar. Bootstrapped and tested on x86_64-linux. OK for trunk? Ok - please give the C++/atomics folks a chance to comment. This change of default behavior should also be

[committed] Support OpenMP linear clause with arrays

2014-06-25 Thread Jakub Jelinek
to 4.9.1 next week. 2014-06-25 Jakub Jelinek ja...@redhat.com * langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. (LANG_HOOKS_DECLS): Add it. * gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. * tree.h

Re: strlen: update datastructure when replacing malloc with calloc

2014-06-25 Thread Jakub Jelinek
On Wed, Jun 25, 2014 at 01:16:38PM +0200, Marc Glisse wrote: in my calloc patch, I forgot to update the datastructure when replacing malloc with calloc. Bootstrap+testsuite on x86_64-linux-gnu. 2014-06-25 Marc Glisse marc.gli...@inria.fr PR tree-optimization/57742 gcc/ *

Re: [PATCH] Fix ubsan/bounds-2.c

2014-06-25 Thread Jakub Jelinek
Hi! On Wed, Jun 25, 2014 at 03:36:38PM +0200, Marek Polacek wrote: static void __attribute__ ((noinline, noclone)) fn7 (void) { - int n = 5, i; + int n = 5; + volatile int i; volatile int c[n][n][n]; - c[5][2][2] = 2; - c[2][5][2] = 2; - c[2][2][5] = 2; + asm ( : : r

[PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-25 Thread Jakub Jelinek
vector shifts and bitwise or, and fixing the expansion of vector rotates. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and eventually 4.9 too? 2014-06-25 Jakub Jelinek ja...@redhat.com PR tree-optimization/57233 PR tree-optimization/61299 * tree

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 07:43:55AM +0200, Marc Glisse wrote: + if (compute_type == TREE_TYPE (type) + !VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) +{ + optab oplv, opl, oprv, opr, opo; + oplv = optab_for_tree_code (LSHIFT_EXPR, type, optab_vector); +

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 08:10:15AM +0200, Jakub Jelinek wrote: +compute_type = get_compute_type (LSHIFT_EXPR, opl, type); +if (compute_type == TREE_TYPE (type) +|| compute_type != get_compute_type (RSHIFT_EXPR, opr, type) +|| compute_type

Re: [PATCH 1/2] Enable setting sign and unsigned promoted mode (SPR_SIGNED_AND_UNSIGNED)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 07:41:22PM +1000, Kugan wrote: 2014-06-26 Kugan Vivekanandarajah kug...@linaro.org * calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET Missing full stop. --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@

Re: [PATCH 1/2] Enable setting sign and unsigned promoted mode (SPR_SIGNED_AND_UNSIGNED)

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 12:12:03PM +0200, Jakub Jelinek wrote: @@ -5234,14 +5235,14 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal) if (CONSTANT_P (temp) GET_MODE (temp) == VOIDmode) { temp = convert_modes (GET_MODE (target), TYPE_MODE

Re: [PATCH] Fix vector rotate regression (PR tree-optimization/57233)

2014-06-26 Thread Jakub Jelinek
= lshr_optab; + opr = optab_for_tree_code (RSHIFT_EXPR, type, optab_scalar); Looks like there are some typos in there, you are assigning to oprv twice. Oops, fixed thusly. 2014-06-25 Jakub Jelinek ja...@redhat.com PR tree-optimization/57233 PR tree-optimization

Re: [PATCH] Devirtualization dump functions fix

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 04:10:03PM +0200, Richard Biener wrote: On Thu, Jun 26, 2014 at 3:43 PM, Martin Liška mli...@suse.cz wrote: On 06/26/2014 03:20 PM, Richard Biener wrote: On Thu, Jun 26, 2014 at 3:01 PM, Martin Liška mli...@suse.cz wrote: Hello, I encountered similar

Re: [PATCH] Devirtualization dump functions fix

2014-06-26 Thread Jakub Jelinek
On Thu, Jun 26, 2014 at 04:27:49PM +0200, Martin Liška wrote: Well yes - it is of course similar broken in spirit but at least a lot simpler ;) I'd put a comment there why we do check g for NULL. But it increases overhead, there are hundreds of gimple_location calls and most of them will

[RFC PATCH] -fsanitize=nonnull and -fsanitize=returns-nonnull support

2014-06-27 Thread Jakub Jelinek
and form (AFAIK clang also added the gcc {,returns_}nonnull attributes). If they wouldn't be interested, guess we could add them in a separate, gcc owned, source file in ubsan (like we own Makefile*). 2014-06-27 Jakub Jelinek ja...@redhat.com * flag-types.h (enum sanitize_code): Add

[PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Jakub Jelinek
Hi! This fixes the most common source of the new runtime diagnostics during bootstrap-ubsan, if num is 0, ira_object_id_map is often 0 as well. Ok for trunk/4.9? 2014-06-27 Jakub Jelinek ja...@redhat.com * ira-build.c (sort_conflict_id_map): Don't call qsort if num is 0

Re: [PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Jakub Jelinek
On Fri, Jun 27, 2014 at 11:34:48AM +0200, Richard Biener wrote: On Fri, Jun 27, 2014 at 9:16 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! This fixes the most common source of the new runtime diagnostics during bootstrap-ubsan, if num is 0, ira_object_id_map is often 0 as well. Ok

Re: [PATCH][RFC] Fix PR61473, inline small memcpy/memmove during tree opts

2014-06-27 Thread Jakub Jelinek
On Fri, Jun 27, 2014 at 01:49:38PM +0200, Richard Biener wrote: I'm going to go for a single load/store and MOVE_MAX for now - I have quite some fallout to deal with anyway (analyzed strlenopt-1.c FAIL only, the other strlenopt cases are probably similar) FAIL: gcc.dg/strlenopt-1.c

Re: [RFC PATCH] -fsanitize=nonnull and -fsanitize=returns-nonnull support

2014-06-28 Thread Jakub Jelinek
On Sat, Jun 28, 2014 at 01:29:47PM +0200, Gerald Pfeifer wrote: On Fri, 27 Jun 2014, Jakub Jelinek wrote: This patch implements sanitization for nonnull and returns_nonnull attributes. No documentation patch? I'll add it soon. Also, should this be documented in gcc-4.10/changes.html

[committed] Fix up -fsanitize=bounds documentation

2014-06-30 Thread Jakub Jelinek
Hi! -fsanitize=bounds is one of the -fsanitize=undefined suboptions, therefore it should be documented as such. Fixed thusly, committed to trunk as obvious. 2014-06-30 Jakub Jelinek ja...@redhat.com * doc/invoke.texi (-fsanitize=bounds): Move to the table with -fsanitize

Re: [PATCH] Properly honor no_sanitize_undefined attribute

2014-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2014 at 02:08:26PM +0200, Marek Polacek wrote: Apparently I didn't pay much attention to no_sanitize_undefined attribute when adding new features to ubsan, so we would instrument stuff even though the function is marked with this attribute. Thus fixed new testcases added.

Re: [PATCH] Properly honor no_sanitize_undefined attribute

2014-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2014 at 02:58:53PM +0200, Jakub Jelinek wrote: On Mon, Jun 30, 2014 at 02:08:26PM +0200, Marek Polacek wrote: Apparently I didn't pay much attention to no_sanitize_undefined attribute when adding new features to ubsan, so we would instrument stuff even though the function

Re: [C PATCH] Add -Wint-conversion option

2014-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2014 at 10:51:59PM +0200, Gerald Pfeifer wrote: Can you please add this and the other one to gcc-4.10/changes.html? I can provide help if you need any. We don't have gcc-4.10/ directory, because the version of the next release is still to be decided (hopefully at Cauldron next

[PATCH] Fix ICE on old style init of derived components

2014-07-02 Thread Jakub Jelinek
Jakub Jelinek ja...@redhat.com Fritz Reese reese-fr...@zai.com * decl.c (variable_decl): Reject old style initialization for derived type components. * gfortran.dg/oldstyle_5.f: New test. --- gcc/fortran/decl.c.jj 2014-06-30 09:28:50.0 +0200

[PATCH] Fix various undefined behaviors in gcc found by bootstrap-ubsan

2014-07-02 Thread Jakub Jelinek
either a library routine or 3 shifts and IOR). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-07-02 Jakub Jelinek ja...@redhat.com * gcov-io.c (gcov_read_words): Don't call memmove if excess is 0. * data-streamer-in.c (streamer_read_hwi): Shift UHWI 1

Re: [PATCH, i386] Add prefixes avoidance tuning for silvermont target

2014-07-02 Thread Jakub Jelinek
On Wed, Jul 02, 2014 at 09:21:25AM -0700, Andi Kleen wrote: Ilya Enkovich enkovich@gmail.com writes: Silvermont processors have penalty for instructions having 4+ bytes of prefixes (including escape bytes in opcode). This situation happens when REX prefix is used in SSE4

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-02 Thread Jakub Jelinek
On Wed, Jul 02, 2014 at 04:06:30PM -0700, Jason Merrill wrote: I think that makes sense; I'm not aware of anyone working on improving LTO debugging. I think at this point all we care about is that with -flto we don't ICE on those, perhaps we should arrange to change all the tests into dg-do

[PATCH] Fix simplify_comparison in the combiner (PR rtl-optimization/61673)

2014-07-03 Thread Jakub Jelinek
on x86_64-linux, i686-linux and s390{,x}-linux. Ok for trunk/4.9? 2014-07-03 Jakub Jelinek ja...@redhat.com PR rtl-optimization/61673 * combine.c (simplify_comparison): Test just mode's sign bit in tmode rather than the sign bit and any bits above it. * gcc.c-torture

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 09:41:15AM +0200, Richard Biener wrote: On July 3, 2014 7:37:13 AM CEST, Jakub Jelinek ja...@redhat.com wrote: On Wed, Jul 02, 2014 at 04:06:30PM -0700, Jason Merrill wrote: I think that makes sense; I'm not aware of anyone working on improving LTO debugging. I

Re: [PATCH] Add guality [p]type test.

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 11:53:29AM +0200, Mark Wielaard wrote: I pulled out the guality.exp [p]type test extension from the actual dwarf2out.c changes (which I will repost soon with some tweaks). I think the test extension itself is useful on its own (and will use it to add tests for my new

Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 12:41:46PM +0200, Marek Polacek wrote: On Sat, Jun 28, 2014 at 06:52:00PM +0200, Gerald Pfeifer wrote: On Fri, 20 Jun 2014, Marek Polacek wrote: +@item -fsanitize=bounds +@opindex fsanitize=bounds + +This option enables instrumentation of array bounds. Various

Re: [PATCH, i386] Add prefixes avoidance tuning for silvermont target

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 02:49:10PM +0400, Ilya Enkovich wrote: 2014-07-02 20:21 GMT+04:00 Andi Kleen a...@firstfloor.org: Ilya Enkovich enkovich@gmail.com writes: Silvermont processors have penalty for instructions having 4+ bytes of prefixes (including escape bytes in opcode). This

Re: gfortran-dg-runtest, torture options

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 12:54:32PM +0200, Thomas Schwinge wrote: Thanks Janis and Mikael for your replies (nearly a year ago...), but still my questions remain to be answered: in my understanding, the libgomp testsuite is not the place for compiler torture testing (different optimization flags

Re: gfortran-dg-runtest, torture options

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 01:06:48PM +0200, Thomas Schwinge wrote: On Thu, 3 Jul 2014 12:58:32 +0200, Jakub Jelinek ja...@redhat.com wrote: On Thu, Jul 03, 2014 at 12:54:32PM +0200, Thomas Schwinge wrote: Thanks Janis and Mikael for your replies (nearly a year ago...), but still my

Re: [Patch, libgomp] libgomp.fortran/fortran.exp - add -fintrinsic-modules-path ${blddir}

2014-07-03 Thread Jakub Jelinek
? CCing testsuite maintainers.) Comments? What about this instead, pass it only for Fortran tests and nothing else? Only very lightly tested so far. 2014-07-03 Jakub Jelinek ja...@redhat.com * testsuite/lib/libgomp.exp (libgomp_target_compile): If $source matches regex

Re: gfortran-dg-runtest, torture options

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 02:37:41PM +0200, Thomas Schwinge wrote: OK to document as follows? 2014-07-03 Jakub Jelinek ja...@redhat.com libgomp/ * testsuite/libgomp.fortran/fortran.exp: Explain gfortran-dg-runtest usage. You wrote the patch, so put your name on it. Ok

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 08:37:07PM +0200, Richard Biener wrote: Well, simply removing the regression testing for LTO is a maintainance nightmare as well. The guality testsuite is very noisy anyway with all the xfail and xpass. Let's keep it as is then? Jakub

[PATCH] Fix high handling in wi::mul_internal (PR tree-optimization/61682)

2014-07-03 Thread Jakub Jelinek
Hi! Several places in wi::mul_internal didn't handle high parameter and would return the low bits instead of high bits. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-07-03 Jakub Jelinek ja...@redhat.com PR tree-optimization/61682

[PATCH] Fix recognize_single_bit_test (PR tree-optimization/61684)

2014-07-03 Thread Jakub Jelinek
Hi! The rhs1 of CONVERT_EXPR_CODE_P doesn't have to be a SSA_NAME, can be e.g. invariant like ADDR_EXPR of a var, but ifcombine didn't think about that possibility. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.9/4.8? 2014-07-03 Jakub Jelinek ja

[PATCH] Fix ICE with thunks (PR middle-end/61654)

2014-07-03 Thread Jakub Jelinek
Hi! update_ssa that expand_thunk calls, if it needs to change anything, computes CDI_DOMINATORS, but we assert that dominators are not computed when we release e.g. an unused thunk. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.9? 2014-07-03 Jakub Jelinek

Re: [PATCH] Don't run guality.exp tests with LTO_TORTURE_OPTIONS.

2014-07-03 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 10:04:35PM +0200, Mark Wielaard wrote: On Thu, 2014-07-03 at 21:52 +0200, Richard Biener wrote: On July 3, 2014 8:38:14 PM CEST, Jakub Jelinek ja...@redhat.com wrote: On Thu, Jul 03, 2014 at 08:37:07PM +0200, Richard Biener wrote: Well, simply removing

Re: [PATCH] Add patch for debugging compiler ICEs

2014-07-04 Thread Jakub Jelinek
On Fri, Jul 04, 2014 at 04:13:31PM +0100, James Greenhalgh wrote: On Mon, Jun 02, 2014 at 04:21:14PM +0100, Maxim Ostapenko wrote: Hi, A years ago there was a discussion (https://gcc.gnu.org/ml/gcc-patches/2004-01/msg02437.html) about debugging compiler ICEs that resulted in a patch

[PATCH] -fsanitize=alignment support

2014-07-04 Thread Jakub Jelinek
, the latter only for alignment, as for placement new we don't construct anything at NULL address. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-07-04 Jakub Jelinek ja...@redhat.com * opts.c (common_handle_option): Handle -fsanitize=alignment. * ubsan.h

Re: [PATCH] Fix arrays in rtx.u + add minor rtx verification

2014-07-04 Thread Jakub Jelinek
and i686-linux, haven't seen any measurable difference in 1000x invocations of null .c file compilations. It is just 18 GC allocations + I ggc_free all of them. 2014-07-04 Jakub Jelinek ja...@redhat.com * expmed.c (struct init_expmed_rtl): Change all fields but pow2 and cint

Re: Make declaration of wide_int_storage match its definition

2014-07-05 Thread Jakub Jelinek
On Sat, Jul 05, 2014 at 09:25:50PM +0200, Gerald Pfeifer wrote: On Sat, 5 Jul 2014, pins...@gmail.com wrote: This patch is fine but c++ allows class and struct be used interchangeable. If there is a compilers which does not it is broken and should be report to them. Yes that means clang

Re: [PATCH 1/2] Enable setting sign and unsigned promoted mode (SPR_SIGNED_AND_UNSIGNED)

2014-07-07 Thread Jakub Jelinek
On Mon, Jul 07, 2014 at 04:52:39PM +1000, Kugan wrote: Ok with following nit: +/* Checks if RTX of SUBREG_PROMOTED_VAR_P() is promoted for given SIGN. */ +#define SUBREG_CHECK_PROMOTED_SIGN(RTX, SIGN)\ +((SIGN) == SRP_POINTER ? SUBREG_PROMOTED_GET (RTX) == SRP_POINTER\ + :

Re: [PATCH] Remove repeating strlen instrumentation.

2014-07-07 Thread Jakub Jelinek
On Mon, Jul 07, 2014 at 06:09:41PM +0400, Maxim Ostapenko wrote: This patch removes repeating strlen instrumentation. Regtested/bootstrapped on x86_64-unknown-linux-gnu. Ok to commit? Ok. Jakub

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-07-07 Thread Jakub Jelinek
On Mon, Jul 07, 2014 at 05:03:07PM +0200, Bernd Schmidt wrote: On 07/07/2014 04:50 PM, Ilya Verbin wrote: 2) Or should I build accel compiler as a cross from x86_64-pc-linux-gnu to x86_64-intelmic-linux-gnu? Yes, that's the general idea. Will it help to distinguish the libs? Is libgomp

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-07-07 Thread Jakub Jelinek
On Mon, Jul 07, 2014 at 05:14:27PM +0200, Jakub Jelinek wrote: We need a libgomp for the offload targets to be different from the host libgomp even on targets like mic, because there are various omp_* functions that should behave differently. Or the host libgomp needs to have a way how

[PATCH] Fix VRP handling of __builtin_ffs* (PR tree-optimization/61725)

2014-07-08 Thread Jakub Jelinek
of maximum of the range if minimum is negative, then one of the negative values is in the range and therefore the topmost bit is sometimes set. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.9? 2014-07-08 Jakub Jelinek ja...@redhat.com PR tree-optimization/61725

Re: [i386] Replace builtins with vector extensions

2014-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2014 at 03:14:04PM +0400, Kirill Yukhin wrote: On the over hand, updated in such a way intrinsic may actually generate different instruction then intended (e.g. FMA case). It is the same with scalars, we have -ffp-contract for that. Agreed. I don't think we actually

Re: [PATCH 4.9][AArch64] Backport 211892: PR/60825 Make float64x1_t in arm_neon.h a proper vector type

2014-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2014 at 12:28:54PM +0100, Alan Lawrence wrote: This corrects name-mangling of float64x1_t and makes it a distinct type from float64_t, as per ACLE - the error mentioned in the Caveats section at https://gcc.gnu.org/gcc-4.9/changes.html. (Only) Changes from the original patch

Re: [PATCH 4.9][AArch64] Backport 211892: PR/60825 Make float64x1_t in arm_neon.h a proper vector type

2014-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2014 at 01:08:27PM +0100, Marcus Shawcroft wrote: float64_t, as per ACLE - the error mentioned in the Caveats section at https://gcc.gnu.org/gcc-4.9/changes.html. ... along with a statement that this would be fixed Clearly the ABI change between 4.9.0 and 4.9.1 is not

[RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)

2014-07-08 Thread Jakub Jelinek
compilation it would make a difference (introducing new warnings), so perhaps doing it only for 4.10/5.0+ is best. 2014-07-08 Jakub Jelinek ja...@redhat.com PR middle-end/61294 gcc/c-family/ * c.opt (Wmemset-transposed-args): New warning. gcc/c/ * c-typeck.c

Re: [PATCH] Fix simplify_comparison in the combiner (PR rtl-optimization/61673)

2014-07-08 Thread Jakub Jelinek
On Thu, Jul 03, 2014 at 08:35:14AM +0200, Jakub Jelinek wrote: Bootstrapped/regtested on x86_64-linux, i686-linux and s390{,x}-linux. Ok for trunk/4.9? I'd like to see this in 4.9.1, it is a wrong-code regression from 4.8.x, so I'm pinging this now: 2014-07-03 Jakub Jelinek ja

Re: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)

2014-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2014 at 03:24:52PM -0400, Jason Merrill wrote: I don't think we want to warn about e.g. 1-1, only about literal 0. Well, at least literal 0 and '\0'. In any case, it seems both the C and C++ FEs fold the arguments too early, already during the parsing of the argument list. In

Re: [Patch, PR 61720] Clear regex BFS match queue after every iteration

2014-07-09 Thread Jakub Jelinek
On Wed, Jul 09, 2014 at 09:08:40AM +0100, Jonathan Wakely wrote: Thus the plan would be *all* the regex testcases in a single file!?! If I understand correctly, that certainly doesn't make sense. In any Jakub pointed out that there are lots of useful tests for regexes in the glibc testsuite.

Re: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)

2014-07-09 Thread Jakub Jelinek
On Wed, Jul 09, 2014 at 12:26:09PM +0200, Richard Biener wrote: I suppose we could use an INTEGER_CST distinct from the one in TYPE_CACHED_VALUES for raw 0, with a TREE_LANG_FLAG set. Ick. (please no - at least make sure it doesn't survive anywhere to the middle-end, like fold or gimple).

Re: [RFC PATCH] -Wmemset-transposed-args (PR middle-end/61294)

2014-07-09 Thread Jakub Jelinek
On Wed, Jul 09, 2014 at 12:51:32PM +0200, Richard Biener wrote: At least it shouldn't (they are not required to be shared and usually are not if they've gone a transition from TREE_OVERFLOW to !TREE_OVERFLOW). Well, still feels ugly to me - but it's Jasons call in the end. Another

Re: [PATCH, rs6000] Fix ELFv2 homogeneous float aggregate ABI bug

2014-07-10 Thread Jakub Jelinek
On Wed, Jul 09, 2014 at 02:19:36PM -0400, David Edelsohn wrote: This is an ABI change for the affected corner cases of the ELFv2 ABI. However, those cases should be extremely rare; the full compat.exe and struct-layout-1.exp ABI compatibility test suite passed, with the exception of two

[PATCH] -Wmemset-transposed-args (PR middle-end/61294, take 2)

2014-07-10 Thread Jakub Jelinek
. The C FE uses a bitmask on the side (similarly how it already handles sizeof). 2014-07-10 Jakub Jelinek ja...@redhat.com PR middle-end/61294 gcc/c-family/ * c.opt (Wmemset-transposed-args): New warning. gcc/c/ * c-parser.c (c_parser_expr_list): Add new argument

Re: SRA: don't drop clobbers

2014-07-10 Thread Jakub Jelinek
On Thu, Jul 10, 2014 at 04:54:53PM +0200, Richard Biener wrote: + else if (access-grp_to_be_debug_replaced) +{ Why would we care to create clobbers for debug stmts?! Are those even valid? It is not valid. Though, the fields supposedly live nowhere after the clobber, so perhaps one

Re: [PATCH][RFC] Fix PR61473, inline small memcpy/memmove during tree opts

2014-07-10 Thread Jakub Jelinek
On Thu, Jul 10, 2014 at 04:30:13PM +0200, Richard Biener wrote: Compromise hack below. It simply avoids the transform for sources that c_strlen can compute a length of. That fixes all strlenopt testcase apart from strlenopt-8.c which does memcpy (, flag ? a : b); which then still folds

Re: [PATCH] Fix PR61762, reads from string constants

2014-07-10 Thread Jakub Jelinek
On Thu, Jul 10, 2014 at 05:12:53PM +0200, Richard Biener wrote: The following makes sure we fold the reads from string constants created from folding memcpy (foo, string_cst[0], ...) to eventually create similar code as if that memcpy folding wasn't done (move-by-pieces). Bootstrapped and

Re: [PATCH] Fix PR61762, reads from string constants

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 10:00:01AM +0200, Richard Biener wrote: I started with adding an optional arg to native_encode_expr but then figured that all the current workers return failure if the entire expr doesn't fit within 'len'. But what I want is a native_encode_expr That is because the

Re: [PATCH] Fix PR61762, reads from string constants

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 11:13:12AM +0200, Richard Biener wrote: + if (offset = off) + ptr[offset - off] = value; For original off != 0, you aren't checking whether offset - off len though (various places), you don't want to write beyond end of buffer. - return total_bytes; +

Re: FWD: Re: OpenACC subarray specifications in the GCC Fortran front end

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 12:11:10PM +0200, Thomas Schwinge wrote: To avoid duplication of work: with Jakub's Fortran OpenMP 4 target changes recently committed to trunk, and now merged into gomp-4_0-branch, I have trimmed down Ilmir's patch to just the OpenACC bits, OpenMP 4 target changes

Re: [PATCH][RFC] Fix PR61473, inline small memcpy/memmove during tree opts

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 03:36:15PM +0200, Richard Biener wrote: *** c_strlen (tree src, int only_value) *** 606,612 /* If the offset is known to be out of bounds, warn, and call strlen at runtime. */ ! if (offset 0 || offset max) { /*

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 08:42:27AM -0700, Xinliang David Li wrote: I wonder why. The struct definition for gcov_fn_info has not changed in this patch. Perhaps it has been used only in C until now? Jakub

Re: [PATCH] -Wmemset-transposed-args (PR middle-end/61294, take 2)

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 01:29:12AM +0200, Gerald Pfeifer wrote: On Thu, 10 Jul 2014, Jakub Jelinek wrote: +Wmemset-transposed-args +C ObjC C++ ObjC++ Var(warn_memset_transposed_args) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall) +Warn about suspicious call to memset where the third

[PATCH] Fix undefined behavior in x86_64 backend (PR target/61656)

2014-07-11 Thread Jakub Jelinek
. merge_classes seems to be a const function, so the patch should not affect code generation in any way. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk (and 4.9.2?)? 2014-07-11 Jakub Jelinek ja...@redhat.com PR target/61656 * config/i386/i386.c

[PATCH] Fix #pragma omp task if (0) depend (...) handling

2014-07-11 Thread Jakub Jelinek
taskgroup might be waiting for those. Will try to fix that next week. 2014-07-11 Jakub Jelinek ja...@redhat.com * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field. (struct gomp_taskwait): New type. (struct gomp_task): Add taskwait and parent_depends_on

Re: [PATCH] Implement -fsanitize=object-size

2014-07-14 Thread Jakub Jelinek
On Sun, Jul 13, 2014 at 07:55:44PM +0200, Marek Polacek wrote: 2014-07-13 Marek Polacek pola...@redhat.com * ubsan.h (struct ubsan_mismatch_data): Missing description. +/* Expand UBSAN_OBJECT_SIZE internal call. */ + +void +ubsan_expand_objsize_ifn (gimple_stmt_iterator *gsi)

Re: [RFC] Making fold-const sane WRT symbol visibilities

2014-07-14 Thread Jakub Jelinek
On Mon, Jul 14, 2014 at 09:50:34AM -0400, Jason Merrill wrote: /daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1: error: non-constant condition for static assertion /daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1: error: '(f != 0u)'

[PATCH] Do emit certain artificial names into DW_AT_name in debug info

2014-07-15 Thread Jakub Jelinek
On Fri, Jul 23, 2010 at 02:00:11PM +0200, Jakub Jelinek wrote: On Thu, Jul 22, 2010 at 12:19:35PM -0700, Roland McGrath wrote: Similarly: formal_parameter name=.omp_data_i type=#ref1 artificial=1 location={locexpr}/ Should that really have a name? As it stands, the debugger

Re: [PATCH] Fix ubsan ICE with flexible array members

2014-07-15 Thread Jakub Jelinek
On Tue, Jul 15, 2014 at 01:01:10PM +0200, Marek Polacek wrote: We were missing a check that the TYPE_MAX_VALUE is not NULL. If it is, we ICE later when gimplifying the UBSAN_BOUNDS call arguments. Bootstrapped/regtested on x86_64-linux, ok for trunk? Ok, thanks. 2014-07-15 Marek Polacek

Re: [PATCH, rs6000] Fix many powerpc*-linux ASAN test suite failures

2014-07-16 Thread Jakub Jelinek
On Wed, Jul 16, 2014 at 05:18:06AM -0400, David Edelsohn wrote: This passed bootstrap and regtesting on powerpc64-linux with no regressions. Ok for mainline? Peter * config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file. * config/rs6000/sysv4.h (CC!_SPEC):

Re: [Patch] Fix UBSan tests for arm-linux-gnueabi.

2014-07-17 Thread Jakub Jelinek
On Thu, Jul 17, 2014 at 01:45:42PM +0400, Maxim Ostapenko wrote: I see regressions in some UBSan output pattern tests (bounds-2.c and some others) on arm-linux-gnueabi if we use ssh to deliver executables to remote target. After some investigation, I discovered, that Dejagnu deletes trailing

  1   2   3   4   5   6   7   8   9   10   >