Re: [PATCH][Revised] Fix PR55521 by switching libsanitizer from mach_overrideto mac interpose functions on darwin

2012-12-02 Thread Konstantin Serebryany
Hi Jack, May I ask you to attach the complete patch (with ChangeLog entries and regenerated files, if possible)? May I also ask you to update libsanitizer/merge.sh to handle libsanitizer/asan/dynamic ? Assuming the files from upstream are copied verbatim (are they?), the patch is ok. Still, please

Go patch committed: Fix field tracking in global var initializer

2012-12-02 Thread Ian Lance Taylor
This patch to the Go compiler avoids a crash if a tracked field is referenced in the initializer for a global variable. Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 879fac2f2103 go/expressions.cc --- a/go/expressions.cc Sun Dec 02 22:55:02 2012 -0800 +++ b/go/exp

Re: [PATCH] asan unit tests from llvm lit-test

2012-12-02 Thread Konstantin Serebryany
Looks good. Long term the fact that we need to completely fork these tests makes me sad. I'd really love to see a way to make them compiler-neutral. All we need is to mock FileCheck (or put it into libsanitizer/aux somehow). Ideas? --kcc On Sat, Dec 1, 2012 at 12:35 AM, Wei Mi wrote: > Thanks

Go patch committed: Don't encode non-ASCII characters in identifiers

2012-12-02 Thread Ian Lance Taylor
Go permits non-ASCII characters in identifiers. A long time ago I thought I needed to encode those before passing them to GIMPLE. Looking at the -fextended-identifiers support, I see that that should not be true. This patch removes the encoding. This should give a better debugging experience an

Re: [patch]: 2 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Ian Lance Taylor
On Thu, Nov 29, 2012 at 4:05 AM, Kai Tietz wrote: > > 2012-11-29 Kai Tietz > > PR target/53912 > * ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t. This is OK. Thanks. Ian

Re: [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Ian Lance Taylor
On Thu, Nov 29, 2012 at 5:40 AM, Kai Tietz wrote: > Updated variant using HOST_WIDE_INT_PRINT. > > Tested for i686-w64-mingw32 and x86_64-w64-mingw32. Ok for apply? > > Kai > > Index: tree-dump.c > === > --- tree-dump.c (Revision 193

Re: [patch]: 3 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Ian Lance Taylor
On Thu, Nov 29, 2012 at 4:07 AM, Kai Tietz wrote: > > 2012-11-29 Kai Tietz > > PR target/53912 > * pointer-set.c (hash1): Cast from pointer via uintptr_t. This is OK. Thanks. Ian

Go patch committed: Fix nil func calls, constant float type conversions

2012-12-02 Thread Ian Lance Taylor
This patch to the Go frontend fixes two small, unrelated, things. Calls to a nil func value (corresponding to a NULL function pointer in C) should panic in Go, and panics should be recoverable. They were not recoverable in gccgo, because the exception unwinder does not unwind past a zero PC (beca

Re: New option to turn off stack reuse for temporaries

2012-12-02 Thread Xinliang David Li
My first example is not correct --- according to the standard, the lifetime of the temporary should be extended. The second example is an user error. C++ standard says this in 12.2.5: " The second context is when a reference is bound to a temporary. The temporary to which the reference is bound

Re: [Patch, Fortran] No-op Patch - a.k.a. FINAL wrapper update

2012-12-02 Thread Janus Weil
Hi Tobias, >> In my version of the patch I introduced a routine 'gfc_is_finalizable' to >> perform this decision. > > > Okay. How about the following patch? It's the same without the renaming. > > Build an regtested on x86-64-linux.* > OK for the trunk? Yes, looks ok to me. Thanks for the patch!

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janus Weil
Hi, >> since the first version of my SYSTEM_CLOCK patch was not so well >> received, I propose here an alternative patch: It does not use a fixed >> COUNT_RATE, but adjusts it to match the resolution of the underlying >> library function which is used. For the int4 version it additionally >> limit

[patch][c++] Stop in cp_write_global_declarations after writing a PCH

2012-12-02 Thread Steven Bosscher
Hello, The C++ front end pushes everything through the compiler queue after writing a PCH. This is pointless: After the PCH is written nothing the compiler does has any effect on it anymore. This patch makes the C++ front end stop after writing the PCH, speeding up PCH creation The C front end h

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janne Blomqvist
On Sun, Dec 2, 2012 at 4:46 PM, Tobias Burnus wrote: > Janne Blomqvist wrote: >> >> Needing to link with librt in order to access clock_gettime is an >> unfortunate wart in glibc, but other C libraries exist out there >> (heck, given the success of Android, glibc is certainly a minority >> even if

[PATCH][Revised] Fix PR55521 by switching libsanitizer from mach_overrideto mac interpose functions on darwin

2012-12-02 Thread Jack Howarth
The attached patch eliminates PR 55521/sanitizer by switching libasan on darwin from using mach_override to mac function interposition via the importation of the asan/dynamic/asan_interceptors_dynamic.cc file from llvm.org's compiler-rt svn. The changes involve defining USING_MAC_INTERPOSE in

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janne Blomqvist
On Sun, Dec 2, 2012 at 3:19 PM, Janus Weil wrote: > Hi all, > > since the first version of my SYSTEM_CLOCK patch was not so well > received, I propose here an alternative patch: It does not use a fixed > COUNT_RATE, but adjusts it to match the resolution of the underlying > library function which

Re: Simplify a VEC_SELECT from one half of a VEC_CONCAT

2012-12-02 Thread Uros Bizjak
On Sun, Dec 2, 2012 at 6:39 PM, Marc Glisse wrote: > While I was there, I decided to improve another bit of VEC_SELECT > simplification (this supersedes the patch in the father of this message). > > Adding Uros in Cc: because I am touching the x86 backend. Sorry to add yet > another insn variant,

Re: [PATCH] Fix PR55521 by switching libsanitizer from mach_override to mac interpose functions on darwin

2012-12-02 Thread Alexander Potapenko
On Sun, Dec 2, 2012 at 10:15 PM, Jack Howarth wrote: > On Sun, Dec 02, 2012 at 10:21:02AM +0400, Alexander Potapenko wrote: >> Hi Jack, >> >> IIUC the wrappers for dispatch_async_f, dispatch_sync_f and other >> dispatch_smth_f do not need blocks support in the compiler, since >> regular functions

Re: [PATCH] Fix PR55521 by switching libsanitizer from mach_override to mac interpose functions on darwin

2012-12-02 Thread Jack Howarth
On Sun, Dec 02, 2012 at 10:21:02AM +0400, Alexander Potapenko wrote: > Hi Jack, > > IIUC the wrappers for dispatch_async_f, dispatch_sync_f and other > dispatch_smth_f do not need blocks support in the compiler, since > regular functions are passed into them. So you may want to add the > dynamic i

Re: Simplify a VEC_SELECT from one half of a VEC_CONCAT

2012-12-02 Thread Marc Glisse
While I was there, I decided to improve another bit of VEC_SELECT simplification (this supersedes the patch in the father of this message). Adding Uros in Cc: because I am touching the x86 backend. Sorry to add yet another insn variant, but I don't see how we can avoid it here. The x86 and RTL

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janus Weil
>> Needing to link with librt in order to access clock_gettime is an >> unfortunate wart in glibc, but other C libraries exist out there >> (heck, given the success of Android, glibc is certainly a minority >> even if you limit yourself to Linux), and of those that provide >> clock_gettime, most ha

Re: [PATCH] AIX native TLS support

2012-12-02 Thread David Edelsohn
I checked in the patch. The problem, at least for libgomp testsuite, is GCC is not correctly emitting the definitions of some variables specified with #pragma omp threadprivate(XXX) The symptoms are the variable is placed in a TLS section anchor block, which never should happen, or the BSS varia

Re: [patch] RFA: more fixes for PR55006

2012-12-02 Thread Steven Bosscher
On Thu, Nov 29, 2012 at 9:14 PM, Dominique Dhumieres wrote: >> Of course, I also verified that the darwin10 and sparc issues that >> spawned this long thread are fixed. > > Confirmed: bootstrapped on top of r193939, aermod.f90 is now correctly > compiled. Thanks for the extra testing. Updated patc

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Tobias Burnus
Janne Blomqvist wrote: Needing to link with librt in order to access clock_gettime is an unfortunate wart in glibc, but other C libraries exist out there (heck, given the success of Android, glibc is certainly a minority even if you limit yourself to Linux), and of those that provide clock_gettim

Re: [Patch, Fortran] PR 55548: SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt)

2012-12-02 Thread Janus Weil
Hi all, since the first version of my SYSTEM_CLOCK patch was not so well received, I propose here an alternative patch: It does not use a fixed COUNT_RATE, but adjusts it to match the resolution of the underlying library function which is used. For the int4 version it additionally limits COUNT_RAT

Re: [PATCH] Fix up var-tracking notes emitted in between bbs (PR middle-end/43631)

2012-12-02 Thread Steven Bosscher
On Thu, Nov 15, 2012 at 12:02 AM, Jakub Jelinek wrote: > 2012-11-14 Jakub Jelinek < > > > PR middle-end/43631 > * var-tracking.c (emit_note_insn_var_location, emit_notes_in_bb): > Clear BLOCK_FOR_INSN on notes emitted in between basic blocks, > don't adjust BB_END

Re: New option to turn off stack reuse for temporaries

2012-12-02 Thread Olivier Ballereau
Hello David, Sorry to come so late into the discussion, but... On 21/06/12 00:50, Xinliang David Li wrote: > One of the most common runtime errors we have seen in gcc-4_7 is > caused by dangling references to temporaries whole life time have > ended > > e.g, > > const A& a = foo(); > > or > f

Re: [i386] scalar ops that preserve the high part of a vector

2012-12-02 Thread Marc Glisse
On Sun, 2 Dec 2012, Uros Bizjak wrote: On Sat, Dec 1, 2012 at 6:27 PM, Marc Glisse wrote: here is a patch. If it is accepted, I'll extend it to other vm patterns (mul, div, min, max are likely candidates, but I need to check the doc). It passed bootstrap+testsuite on x86_64-linux. 2012-12-0

Re: [RFA:] fix group-loads of VOIDmode constants, expr.c:emit_group_load_1

2012-12-02 Thread Hans-Peter Nilsson
On Sat, 1 Dec 2012, Eric Botcazou wrote: > > Of course this matters only to >64bit (i.e. >registersize) values like > > TImode, alias __int128. The problem here is that group-loading a > > constant for a function return-value doesn't work; it's passed to > > simplify_gen_subreg which horks on the

Re: [i386] scalar ops that preserve the high part of a vector

2012-12-02 Thread Uros Bizjak
On Sat, Dec 1, 2012 at 6:27 PM, Marc Glisse wrote: > here is a patch. If it is accepted, I'll extend it to other vm patterns > (mul, div, min, max are likely candidates, but I need to check the doc). It > passed bootstrap+testsuite on x86_64-linux. > > > 2012-12-01 Marc Glisse > > PR t

Re: [PATCH] Fix PR55521 by switching libsanitizer from mach_override to mac interpose functions on darwin

2012-12-02 Thread Konstantin Serebryany
On Sun, Dec 2, 2012 at 10:21 AM, Alexander Potapenko wrote: > Hi Jack, > > IIUC the wrappers for dispatch_async_f, dispatch_sync_f and other > dispatch_smth_f do not need blocks support in the compiler, since > regular functions are passed into them. So you may want to add the > dynamic intercepto

Re: [PATCH] Don't bypass blocks with multiple latch edges (PR middle-end/54838)

2012-12-02 Thread Eric Botcazou
> Like this? Regtested/bootstrapped on x86_64-linux, ok for trunk? > > 2012-12-01 Marek Polacek > > PR middle-end/54838 > * cprop.c (bypass_block): Determine number of latches. Return > when there is more than one latch edge. > > * gcc.dg/pr54838.c: New test. That's

Re: [cxx-conversion] graphite-related hash tables

2012-12-02 Thread Tobias Grosser
On Sun, Dec 2, 2012, at 02:42 AM, Lawrence Crowl wrote: > Change graphite-related hash tables from htab_t to hash_table: > > graphite-clast-to-gimple.c ivs_params::newivs_index > graphite-clast-to-gimple.c ivs_params::params_index > graphite-clast-to-gimple.c print_generated_program::params_index

Re: [PATCH] Fix PR gcov-profile/55551 (issue6868045)

2012-12-02 Thread Jan Hubicka
> 2012-12-01 Teresa Johnson > > PR gcov-profile/1 > * lto-cgraph.c (merge_profile_summaries): Handle scaled histogram > entries that map to the same index. Path is OK. It would be nice to figure out why you have non-zero runs and sum_max zero. It is legally possible wh

Re: [patch stmt.c]: 6 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Kai Tietz
Ping 2012/11/29 Kai Tietz : > Hello, > > this trivial patch fixes a bootstrap issue on LLP64 hosts. > > ChangeLog > > 2012-11-29 Kai Tietz > > PR target/53912 > * stmt.c (compute_cases_per_edge): Cast from pointer via intptr_t. > (expand_case): Likewise. > > Tested for i686

Re: [patch print-tree.c]: 5 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Kai Tietz
Ping 2012/11/29 Kai Tietz : > Hello, > > this trivial patch fixes a bootstrap issue on LLP64 hosts. > > ChangeLog > > 2012-11-29 Kai Tietz > > PR target/53912 > * print-tree.c (print_node): Cast from pointer via uintptr_t. > > Tested for i686-w64-mingw32, x86_64-w64-mingw32, and >

Re: [patch tree-dump.c]: 7 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Kai Tietz
Ping 2012/11/29 Kai Tietz : > Updated variant using HOST_WIDE_INT_PRINT. > > Tested for i686-w64-mingw32 and x86_64-w64-mingw32. Ok for apply? > > Kai > > Index: tree-dump.c > === > --- tree-dump.c (Revision 193925) > +++ tree-dump.c

Re: [patch]: 3 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Kai Tietz
Ping 2012/11/29 Kai Tietz : > Hello, > > this trivial patch fixes a bootstrap issue on LLP64 hosts. > > ChangeLog > > 2012-11-29 Kai Tietz > > PR target/53912 > * pointer-set.c (hash1): Cast from pointer via uintptr_t. > > Tested for i686-w64-mingw32, x86_64-w64-mingw32, and > x86_

Re: [patch]: 2 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

2012-12-02 Thread Kai Tietz
Ping 2012/11/29 Kai Tietz : > Hello, > > this trivial patch fixes a bootstrap issue on LLP64 hosts. > > ChangeLog > > 2012-11-29 Kai Tietz > > PR target/53912 > * ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t. > > Tested for i686-w64-mingw32, x86_64-w64-mingw32, and >