[Patch, libgomp, committed] F2015 fix for testsuite/libgomp.fortran/pr34020.f90 (was: [Patch, Fortran] Add library support for coarray's atomic intrinsics)

2014-07-13 Thread Tobias Burnus
Dominique Dhumieres wrote: This probably caused /opt/gcc/work/libgomp/testsuite/libgomp.fortran/pr34020.f90:16.24: call atomic_add(lhs, rhs) 1 Error: ATOM argument at (1) to intrinsic function atomic_add shall be an integer of ATOMIC_INT_KIND I have fixed the

Re: [PATCH] offline gcda profile processing tool

2014-07-13 Thread Andreas Schwab
Rong Xu x...@google.com writes: In my test, I used gcc-4.6 as the host compiler. I got warning like this: In file included from ../../gcc/gcc/../libgcc/libgcov-util.c:30:0: ../../gcc/gcc/../libgcc/libgcov.h:184:30: warning: ISO C++ forbids zero-size array ‘ctrs’ [-pedantic] With gcc 4.3

Re: [Patch, Fortran] Update atomics support for TS18508

2014-07-13 Thread Dominique Dhumieres
The test gfortran.dg/coarray_atomic_4.f90 fails in 32 bit mode: /opt/gcc/work/gcc/testsuite/gfortran.dg/coarray_atomic_4.f90:40.32: call atomic_fetch_and(caf, 22_16, var, stat=stat) 1 Error: Integer kind 16 at (1) not available Dominique

Re: [Patch, Fortran] Update atomics support for TS18508

2014-07-13 Thread Andreas Schwab
call atomic_fetch_and(caf, 22_16, var, stat=stat) 1 Error: Integer kind 16 at (1) not available FAIL: gfortran.dg/coarray_atomic_4.f90 -O (test for excess errors) Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756

[committed] Fix testcase (was: Re: [Patch, Fortran] Update atomics support for TS18508)

2014-07-13 Thread Tobias Burnus
Dominique Dhumieres wrote: The test gfortran.dg/coarray_atomic_4.f90 fails in 32 bit mode: /opt/gcc/work/gcc/testsuite/gfortran.dg/coarray_atomic_4.f90:40.32: call atomic_fetch_and(caf, 22_16, var, stat=stat) 1 Error: Integer kind 16 at (1) not available As I

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 04:00 AM, Ulrich Drepper wrote: + templatestd::size_t _Dimen, typename _RealType, typename _CharT, + typename _Traits +std::basic_ostream_CharT, _Traits +operator(std::basic_ostream_CharT, _Traits __os, + const

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

2014-07-13 Thread Ulrich Drepper
On Sun, Jul 13, 2014 at 5:24 AM, Paolo Carlini paolo.carl...@oracle.com wrote: are these dummy implementations intended? Yes. There is no state. The only parameter is the dimensionality which is a template parameter.

Re: [GSoC] generation of Gimple loops with empty bodies

2014-07-13 Thread Roman Gareev
Hi Dominique, thank you for the message! I've attached a patch, that may fix the issue. Please report back if it fixes the problem. -- Cheers, Roman Gareev. Index: gcc/graphite-isl-ast-to-gimple.c

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 12:04 PM, Ulrich Drepper wrote: On Sun, Jul 13, 2014 at 5:24 AM, Paolo Carlini paolo.carl...@oracle.com wrote: are these dummy implementations intended? Yes. There is no state. The only parameter is the dimensionality which is a template parameter. Ah, interesting, didn't

Re: -fuse-caller-save - Collect register usage information

2014-07-13 Thread Tom de Vries
On 19-06-14 21:45, Richard Henderson wrote: On 06/19/2014 12:36 PM, Jan Hubicka wrote: On 06/19/2014 09:06 AM, Tom de Vries wrote: 2014-06-19 Tom de Vries t...@codesourcery.com * final.c (collect_fn_hard_reg_usage): Don't save function_used_regs if it contains all

Re: [GSoC] generation of Gimple code from isl_ast_node_user

2014-07-13 Thread Tobias Grosser
On 12/07/2014 14:18, Roman Gareev wrote: I've attached the patch, which contains generation of Gimple code from isl_ast_node_user. I think that it would be better to add motivation for the following line from the original source: if (GBB_BB (gbb) == ENTRY_BLOCK_PTR_FOR_FN (cfun)) {

[GSoC][match-and-simplify] Add DEBUG_FUNCTION attribute

2014-07-13 Thread Prathamesh Kulkarni
This patch adds DEBUG_FUNCTION attribute to print_* functions in genmatch.c * genmatch.c (print_operand): Add attribute DEBUG_FUNCTION. (print_matches): Likewise. (decision_tree::print_node): Likewise. (decision_tree::print): Likewise. Thanks and Regards, Prathamesh Index: genmatch.c

Re: [GSoC] generation of Gimple loops with empty bodies

2014-07-13 Thread Dominique Dhumieres
Hi Roman, Thanks for the quick answer. Please report back if it fixes the problem. I have not yet done a full regtest, but a manual testing suggest that the patch fixes the problem. Dominique

Re: [GSoC] generation of Gimple loops with empty bodies

2014-07-13 Thread Dominique Dhumieres
I have regtested graphite.exp for gcc/g++/gfortran/libgomp without regression. So your patch seems a safe fix. Dominique

Re: -fuse-caller-save - Collect register usage information

2014-07-13 Thread Jan Hubicka
When we now have way to represent different reg usages for functions, what would be best way to make local functions to default into saving some SSE registers on x86/x86-64? I wouldn't do that at all. Leave all sse registers call-clobbered. This way you don't need to have different

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

2014-07-13 Thread Ed Smith-Rowland
are these dummy implementations intended? Yes. There is no state. The only parameter is the dimensionality which is a template parameter. We do often serialize underlying helper distributions, in your case the normal distribution _M_n. While the normal distribution mean and stddev are

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

2014-07-13 Thread Ulrich Drepper
On Sun, Jul 13, 2014 at 9:55 AM, Ed Smith-Rowland 3dw...@verizon.net wrote: So I would just serialize _M_n here. It has fixed parameters. This would mean unnecessary work. When you try to use the parameter of the sphere distribution the normal distribution will be reset. So there really is no

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

2014-07-13 Thread Ed Smith-Rowland
On 07/13/2014 10:11 AM, Ulrich Drepper wrote: On Sun, Jul 13, 2014 at 9:55 AM, Ed Smith-Rowland 3dw...@verizon.net wrote: So I would just serialize _M_n here. It has fixed parameters. This would mean unnecessary work. When you try to use the parameter of the sphere distribution the normal

Re: [GSoC] generation of Gimple loops with empty bodies

2014-07-13 Thread Tobias Grosser
On 13/07/2014 12:34, Roman Gareev wrote: Hi Dominique, thank you for the message! I've attached a patch, that may fix the issue. Please report back if it fixes the problem. Roman, this patch is OK to commit, but please include a correct changelog file. Tobias

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 04:11 PM, Ulrich Drepper wrote: On Sun, Jul 13, 2014 at 9:55 AM, Ed Smith-Rowland 3dw...@verizon.net wrote: So I would just serialize _M_n here. It has fixed parameters. This would mean unnecessary work. When you try to use the parameter of the sphere distribution the

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

2014-07-13 Thread Ulrich Drepper
On Sun, Jul 13, 2014 at 11:43 AM, Paolo Carlini paolo.carl...@oracle.com wrote: and I think: the normal distributions in x and y do have a non-trivial state (_M_saved, _M_saved_available) which, at any given moment, is different in x and y. Then the trivial inserter of x is called and the

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 06:03 PM, Ulrich Drepper wrote: On Sun, Jul 13, 2014 at 11:43 AM, Paolo Carlini paolo.carl...@oracle.com wrote: and I think: the normal distributions in x and y do have a non-trivial state (_M_saved, _M_saved_available) which, at any given moment, is different in x and y.

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

2014-07-13 Thread Ulrich Drepper
On Sun, Jul 13, 2014 at 12:07 PM, Paolo Carlini paolo.carl...@oracle.com wrote: Sorry, I still don't get it. When operator() of x and y, two uniform_on_sphere_distribution, call _M_n(__urng) and those _M_n have a different state, the numbers produced are in general different. Correct. But in

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 06:18 PM, Ulrich Drepper wrote: On Sun, Jul 13, 2014 at 12:07 PM, Paolo Carlini paolo.carl...@oracle.com wrote: Sorry, I still don't get it. When operator() of x and y, two uniform_on_sphere_distribution, call _M_n(__urng) and those _M_n have a different state, the numbers

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

2014-07-13 Thread Ulrich Drepper
On Sun, Jul 13, 2014 at 12:25 PM, Paolo Carlini paolo.carl...@oracle.com wrote: I don't think so. It depends on the past of the two different uniform_on_sphere: each time each uniform_on_sphere calls _M_n(__urng) the state of *its own* _M_n changes, evolves from the initial state. I indeed

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

2014-07-13 Thread Paolo Carlini
Hi, On 07/13/2014 06:44 PM, Ulrich Drepper wrote: But your 4th and 7th call example by itself is not a reason. Again, the input exclusively determined by the random numbers. Here, of course, the 4th and 7th use will produce different results. But this is not what the state of the distribution

[GSoC][match-and-simplify] use integral_op_p

2014-07-13 Thread Prathamesh Kulkarni
Hi, This patch uses integral_op_p instead of if (INTEGRAL_TYPE_P (TREE_TYPE (@0))) * match.pd: Remove INTEGRAL_TYPE_P (TREE_TYPE (@0)) in bitwise patterns and use integral_op_p@0 Thanks and Regards, Prathamesh Index: match.pd ===

Re: More informative ODR warnings

2014-07-13 Thread Jan Hubicka
Hi, this is version after taking into account all the feedback. I reformulated the warnings on fields and methods to show the type first and then inform about mismatching elements. On mainline (without ODR type merging) there are no warnings on libxul, but there are few others during Firefox

[PATCH] Implement -fsanitize=object-size

2014-07-13 Thread Marek Polacek
The following is an attempt to implement -fsanitize=object-size. When it sees a MEM_REF, it goes through the definition statements and stops on sth like ptr = sth. Then it tries to determine the object size using __builtin_object_size and generates an internal call (in .ubsan pass). The .sanopt

Re: More informative ODR warnings

2014-07-13 Thread Gerald Pfeifer
Hi Honzo, On Sun, 13 Jul 2014, Jan Hubicka wrote: +@opindex Wodr +@opindex Wno-odr +@opindex Wodr +Warn about One Definition Rule violations during link time optimization. +Require @option{-flto-odr-type-merging} to be enabled. Enabled by default here in invoke.texi you talk about One

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

2014-07-13 Thread Gerald Pfeifer
Hi Marek, On Sun, 13 Jul 2014, Marek Polacek wrote: --- gcc/doc/invoke.texi +++ gcc/doc/invoke.texi @@ -5477,6 +5477,12 @@ This option enables instrumentation of array bounds. Various out of bounds accesses are detected. Flexible array members and initializers of variables with static

[patch,libgfortran] Bug 61632 - memory corruption when writing formatted data

2014-07-13 Thread Jerry DeLisle
Hi all, This bug was caused by an access to an invalid pointer offset to the format string. This was only a problem on the second error using the same format string. I suspect it has to do with caching the format strings. Regardless, the patch fixes this by using the fortran style string

Re: More informative ODR warnings

2014-07-13 Thread Jan Hubicka
Hi Honzo, Nazdar Geralde, On Sun, 13 Jul 2014, Jan Hubicka wrote: +@opindex Wodr +@opindex Wno-odr +@opindex Wodr +Warn about One Definition Rule violations during link time optimization. +Require @option{-flto-odr-type-merging} to be enabled. Enabled by default here in

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

2014-07-13 Thread Jan Hubicka
Hi, this is variant of patch I comitted (the change is only testsuite compensation for pr36902 and 44024) and updated predicate name to nonzero_address Honza * cgraph.h (symtab_node): Add nonzero_address. (decl_in_symtab_p): Break out from ... (symtab_get_node): ... here.

Fix Firefox LTO ICE

2014-07-13 Thread Jan Hubicka
Hi, I updated my firefox tree and now I get ICE at: /aux/hubicka/firefox2/firefox/intl/icu/source/i18n/ucol_bld.cpp:1274:51: note: in statement el.prefix = el.prefixChars; ^ # .MEM_339 = VDEF .MEM_338 el.prefix =

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

2014-07-13 Thread Kugan
On 11/07/14 22:47, Richard Biener wrote: On Fri, Jul 11, 2014 at 1:52 PM, Kugan kugan.vivekanandara...@linaro.org wrote: Thanks foe the review and suggestions. On 10/07/14 22:15, Richard Biener wrote: On Mon, Jul 7, 2014 at 8:55 AM, Kugan kugan.vivekanandara...@linaro.org wrote: [...]

[PATCH] Fix INSN_TICK heuristic for SCHED_PRESSURE

2014-07-13 Thread Maxim Kuvyrkov
Hi, This patch fixes 2 of the [several] problems in rank_for_schedule heuristics for SCHED_PRESSURE_MODEL. SCHED_PRESSURE_MODEL is used for first scheduling pass in ARM backend by default. The first one is when INSN_TICK of both instructions are equal, and rank_for_schedule returns a tie

[PATCH] Add statistical printout of rank_for_schedule decisions

2014-07-13 Thread Maxim Kuvyrkov
Hi, This patch adds dump printouts for scheduling heuristics in rank_for_schedule. Rank_for_schedule is one of the cornerstones of haifa scheduler, yet its decisions are hard to track and debug. This patch adds statistical gathering for each branch of rank_for_schedule, and prints them out

C++ PATCH for c++/58511 (inherited ctor/constexpr diagnostic)

2014-07-13 Thread Jason Merrill
synthesized_method_walk doesn't recognize that the default argument prevents B(int) from producing a constant expression; instead, we should use require_potential_rvalue_constant_expression to get diagnostics for functions that are marked constexpr. And we should keep the DECL_SAVED_TREE for

C++ PATCH for c++/58611 (ICE with invalid constexpr array)

2014-07-13 Thread Jason Merrill
Calling finish_compound_literal in this case ends up trying to reshape an initializer that has already been digested, and removing the call doesn't seem to break anything. Tested x86_64-pc-linux-gnu, applying to trunk. commit 6f94e657ce04fd32cac5e616e9ca675c40e3fab5 Author: Jason Merrill

C++ PATCH for c++/58612 (constexpr ICE)

2014-07-13 Thread Jason Merrill
When we call break_out_target_exprs in the middle of explain_invalid_constexpr_fn, we don't want to replace 'this' with whatever current_class_ptr is at that point. Tested x86_64-pc-linux-gnu, applying to trunk. commit b520b30e2e4bf0174eea966cdccac36eefc5a544 Author: Jason Merrill

Re: C++ PATCH for c++/60628 (auto array)

2014-07-13 Thread Jason Merrill
On 03/25/2014 01:43 PM, Jason Merrill wrote: We got confused tsubsting the VLA type because tsubst doesn't expect to see a SAVE_EXPR. Simple to fix by enforcing the rule against auto arrays. Oops, we already had a diagnostic for this, we just needed to make it an unconditional error.

C++ PATCH for c++/58636 (ICE with std::initializer_listint)

2014-07-13 Thread Jason Merrill
You can't form an array of references in C++, so we shouldn't consider a conversion to an initializer_list of references either. Tested x86_64-pc-linux-gnu, applying to trunk and 4.9. commit 97303858558a5024b357e8ec6f4ffcf4f1c043fe Author: Jason Merrill ja...@redhat.com Date: Sun Jul 13