Re: [PATCH 6/6] Thread pointer built-in functions, mips

2012-07-12 Thread Chung-Lin Tang
On 2012/7/13 02:45 AM, Richard Sandiford wrote: > /* Implement TARGET_EXPAND_BUILTIN_THREAD_POINTER. */ > > static rtx > mips_expand_builtin_thread_pointer (rtx tp) > { > rtx fn; > > if (TARGET_MIPS16) > ... > } > > (i.e. always using the passed-in tp, which is safe with your 1/6 patch)

Re: [PATCH 1/6] Thread pointer built-in functions, core parts

2012-07-12 Thread Chung-Lin Tang
On 2012/7/13 02:37 AM, Richard Sandiford wrote: >> +void >> > +default_expand_builtin_set_thread_pointer (rtx val ATTRIBUTE_UNUSED) >> > +{ >> > + sorry ("__builtin_set_thread_pointer() not available for this target"); >> > +} > Function names should be quoted by %< %>. But maybe we can save the

Re: Fix PR53908

2012-07-12 Thread Hans-Peter Nilsson
> From: Richard Sandiford > Date: Thu, 12 Jul 2012 21:18:54 +0200 > if (CALL_P (insn)) > { > if (RTL_CONST_OR_PURE_CALL_P (insn)) > /* Pure functions can read from memory. Const functions can > read from arguments that the ABI has forced onto the stack.

Re: [PATCH 1/6] Thread pointer built-in functions, core parts

2012-07-12 Thread Chung-Lin Tang
On 2012/7/13 09:28 AM, Mike Stump wrote: > On Jul 11, 2012, at 11:52 PM, Chung-Lin Tang wrote: >> Core parts adding the new hooks. BUILT_IN_THREAD_POINTER and >> BUILT_IN_SET_THREAD_POINTER are different hooks, as some targets only >> implement one of them (thread pointer read). > > sorry seems a

__int256

2012-07-12 Thread Mike Stump
This patch adds __int256 to the front-ends. We follow the __int128 code fairly closely... So, an outstanding question would be, how do I get the mangle codes allocated for the type? I just choose two unused codes, for now. All in all, the patch was pretty straight forward. We have another p

Re: [patch] Add block debug info to phi_arg_d

2012-07-12 Thread Dehao Chen
This implies: 1. This patch does not fix the inline stack issue completely, because expression still does not carry block info correctly. 2. It's not easily possible to check the correctness of the inline stack info by grepping the assembly. I'd suggest: 1. Remove this unittest for now. 2. Integr

Re: [PATCH 1/6] Thread pointer built-in functions, core parts

2012-07-12 Thread Mike Stump
On Jul 11, 2012, at 11:52 PM, Chung-Lin Tang wrote: > Core parts adding the new hooks. BUILT_IN_THREAD_POINTER and > BUILT_IN_SET_THREAD_POINTER are different hooks, as some targets only > implement one of them (thread pointer read). sorry seems a little overly dramatic. I would have thought that

Re: [C++ RFC / Patch] PR 51213 ("access control under SFINAE")

2012-07-12 Thread Jason Merrill
These patches fix the typedef11.C and friend13/15.C failures. Each fixes a latent bug in the compiler. 1) We shouldn't do access control checking for typedefs used in the body of a function when the declaration is instantiated; we should wait until the body is instantiated. 2) We shouldn't

Re: [C++ RFC / Patch] PR 51213 ("access control under SFINAE")

2012-07-12 Thread Jason Merrill
And here's a fix for the access7 failure, to be applied on top of your patch. I notice that your patch changes the behavior of C++98/03 mode as well, which seems wrong to me; I think this is a big enough change that we should limit it to C++11 mode. Jason commit f60b940ab6bcbad60632ba085fa0

[patch] Add test for PR c++/53531

2012-07-12 Thread Jonathan Wakely
PR c++/53531 * testsuite/g++.dg/cpp0x/variadic135.C: New. As suggested in the PR comments this adds a test to ensure this doesn't regress. OK for trunk? commit 2fa33c6b4e5533b7d87ba559b43bb06e501e9851 Author: Jonathan Wakely Date: Thu Jul 12 23:37:40 2012 +0100 PR c++/

Re: [Patch, Fortran] Handle C_F_POINTER with a noncontiguous SHAPE=

2012-07-12 Thread Tobias Burnus
Hi Mikael, dear all, Mikael Morin wrote: PPS: The offset handling in gfortran is really complicated. I wonder whether we have to (or at least should) change it for the new array descriptor. I don't know exactly what you mean by "really complicated". There are not many simple things in gfortran

Re: Fix gcc.dg/lower-subreg-1.c failure, revisited.

2012-07-12 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Sun, 8 Jul 2012 01:02:34 +0200 PR rtl-optimization/53176 > * rtlanal.c (rtx_cost): Adjust default cost for X with a > UNITS_PER_WORD factor for all X according to the size of > its mode, not just for SUBREGs with untieable modes. >

Re: [Patch, Fortran] Add parsing support for assumed-rank array

2012-07-12 Thread Tobias Burnus
Mikael Morin wrote: I don't see how I could. The scalarizer's purpose is translating array statements like foo(:,:) = bar(:,:), where the rank at least is supposed known, so that we know how many nested loops we have to generate. If the number of loops is known at runtime only, hem, I don't see

Re: [Patch, Fortran] Add parsing support for assumed-rank array

2012-07-12 Thread Mikael Morin
On 06/07/2012 23:13, Tobias Burnus wrote: >> In case it's not, then everything is fine I guess, though I prefer >> avoiding polluting the scalarizer with assumed rank stuff ;-). > > It still will get worse, see above. Though, I wouldn't mind if you could > modify the scalarizer. I don't see how

Re: [PATCH] [LM32] Fix lm32-elf-gcc build error by remove unnecessary constant legitimate check.

2012-07-12 Thread Hans-Peter Nilsson
On Thu, 12 Jul 2012, Jia Liu wrote: > May you > give me more comment? I wanna fix it. Sorry, I'll leave that to the lm32 maintainer, I just wasnted to clear a misunderstanding regarding TARGET_LEGITIMATE_CONSTANT_P. brgds, H-P

Re: Fix PR53908

2012-07-12 Thread Richard Sandiford
Steven Bosscher writes: > On Wed, Jul 11, 2012 at 1:24 PM, Bernd Schmidt > wrote>> We're moving a load across a call since we don't recognize calls as >> memory-clobbering. >> >> Bootstrapping and testing now on 4.7 x86_64-linux, ok everywhere? > > Maybe: > + if (CALL_P (insn) > + &

Re: [PATCH 6/6] Thread pointer built-in functions, mips

2012-07-12 Thread Richard Sandiford
Chung-Lin Tang writes: > @@ -2851,11 +2851,12 @@ mips_call_tls_get_addr (rtx sym, enum mips_symbol_ > /* Return a pseudo register that contains the current thread pointer. */ > > static rtx > -mips_get_tp (void) > +mips_get_tp (rtx target) > { > - rtx tp, fn; > + rtx fn; > + rtx tp = (tar

Re: [Patch, Fortran] Handle C_F_POINTER with a noncontiguous SHAPE=

2012-07-12 Thread Mikael Morin
On 28/06/2012 09:34, Tobias Burnus wrote: > This patch generates inline code for C_F_POINTER with an array argument. > One reason is that GCC didn't handle SHAPE= arguments which were > noncontiguous. > > However, the real motivation is the fortran-dev branch with the new > array-descriptor: C_F_P

Re: [PATCH 1/6] Thread pointer built-in functions, core parts

2012-07-12 Thread Richard Sandiford
Hi Chung-Lin, Chung-Lin Tang writes: > Core parts adding the new hooks. BUILT_IN_THREAD_POINTER and > BUILT_IN_SET_THREAD_POINTER are different hooks, as some targets only > implement one of them (thread pointer read). Thanks a lot for doing this. It looks great to me, although I can't approve

Re: [patch] Fix tree-ssa-reassoc to not look at first_pass_instance

2012-07-12 Thread Richard Günther
Steven Bosscher wrote: >On Thu, Jul 12, 2012 at 2:38 PM, Richard Guenther > wrote: >>> Richi, could you please have a look at jump threading, and see if >>> first_pass_instance can be remove? > >Ping? :-) > > >>> Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for trunk? >> >> This was propos

[PATCH, i386]: Cleanup cmove splitters

2012-07-12 Thread Uros Bizjak
Hello! 2012-07-12 Uros Bizjak * config/i386/i386.md (QImode and HImode cmove splitters): Merge QImode and HImode splitters. Use ix86_comparison_operator. Explicitly match FLAGS_REG. (DFmode cmove splitter): Explicitly match FLAGS_REG. Tested on x86_64-pc-linux

Re: [patch] Fix tree-ssa-reassoc to not look at first_pass_instance

2012-07-12 Thread Steven Bosscher
On Thu, Jul 12, 2012 at 2:38 PM, Richard Guenther wrote: >> Richi, could you please have a look at jump threading, and see if >> first_pass_instance can be remove? Ping? :-) >> Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for trunk? > > This was proposed before and I did not like that,

Re: [C++ RFC / Patch] PR 51213 ("access control under SFINAE")

2012-07-12 Thread Jason Merrill
On 06/15/2012 04:27 PM, Paolo Carlini wrote: FAIL: g++.dg/template/access7.C -std=c++98 (test for errors, line 8) FAIL: g++.dg/template/access7.C -std=c++98 (test for errors, line 12) FAIL: g++.dg/template/access7.C -std=c++98 (test for warnings, line 17) FAIL: g++.dg/template/access7.C -std=c++9

Re: [patch] Add block debug info to phi_arg_d

2012-07-12 Thread Uros Bizjak
Hello! > A test is added. Is it ok? > > gcc/testsuite/ChangeLog > > 2012-07-08 Dehao Chen > > * gcc.dg/debug_info_inline.c: New test. This test fails on alphaev68-unknown-linux-gnu [1] and other non-x86 targets [2] too: FAIL: gcc.dg/debug_info_inline.c scan-assembler loc 1 19 0\\n.*\\

Re: [PATCH] [LM32] Fix lm32-elf-gcc build error by remove unnecessary constant legitimate check.

2012-07-12 Thread Jia Liu
Hi Hans, On Thu, Jul 12, 2012 at 10:04 AM, Hans-Peter Nilsson wrote: > On Tue, 10 Jul 2012, Jia Liu wrote: >> Hi all, >> >> When I build lm32-elf-gcc, it failed at libgcc configure due to >> lm32-elf-cc1 segment fault when compile conftest.c: >> >> void bar (); >> void clean (int *); >> void foo

Re: [patch] Fix tree-ssa-reassoc to not look at first_pass_instance

2012-07-12 Thread Richard Guenther
On Thu, Jul 12, 2012 at 2:24 PM, Steven Bosscher wrote: > Hello, > > The global variable first_pass_instance exists to hack jump threading, > see tree-pass.h: > > /* Set to true if the pass is called the first time during compilation of the >current function. Note that using this information

[patch] Fix tree-ssa-reassoc to not look at first_pass_instance

2012-07-12 Thread Steven Bosscher
Hello, The global variable first_pass_instance exists to hack jump threading, see tree-pass.h: /* Set to true if the pass is called the first time during compilation of the current function. Note that using this information in the optimization passes is considered not to be clean, and it s

Re: [patch][fortran] Include coretypes.h in .c files, not in gfortran.h

2012-07-12 Thread Steven Bosscher
On Thu, Jul 12, 2012 at 11:29 AM, Tobias Burnus wrote: > On 07/07/2012 11:28 PM, Steven Bosscher wrote: >> >> I must say, I am surprised that gfortran.h includes coretypes.h. The >> idea always was to try and keep the front end and the back end as much >> separated as possible, and including coret

Re: new sign/zero extension elimination pass

2012-07-12 Thread Kenneth Zadeck
sorry about the two messages. i mis spelled the gcc-patches on the first try. you are on the right track with the example but combine will not get this unless everything is in the same bb. the whole point of having a separate pass for doing extension elimination is that it needs to be done ove

[Ada] Add VMS qualifiers for -gnatn1/2 switches.

2012-07-12 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Vasiliy Fofanov * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches. Index: vms_data.ads === --- vms_data.ads(revision 189431) +++ vms_data.ads

[Ada] SCOs for SELECT statements

2012-07-12 Thread Arnaud Charlet
This change refines the source coverage obligation information emitted for SELECT statements to allow structural coverage analysis of code that use tasking. The following compilation must produce the indicated SCOs. procedure Sel is task Opmaster is entry Compute_And (A, B : Boolean; Resu

[Ada] Fix dependency problems from System.Restrictions

2012-07-12 Thread Arnaud Charlet
This patch completely changes the way restrictions information is generated in the ALI file. Instead of using a positional notation that is sensitive to the addition of new restrictions, it uses a named notation, that avoids this dependency. If a new restriction is added, and an incompatible versio

[Ada] Optimization of the Lock-free implementation of protected object

2012-07-12 Thread Arnaud Charlet
The optimization of the expansion of protected procedure for the lock-free implementation brings the following changes: - Several renamings in order to match GCC built-in function wordings. - Expected_Comp declaration moved to the the declarations list of the procedure - GCC built-in operation__syn

[Ada] Allow the same library project in different project tree

2012-07-12 Thread Arnaud Charlet
It is possible to have the same library project in different aggregated projects, so in different project tree. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Pascal Obry * prj-nmsc.adb (Check_Library_Attributes): Allow the same library project in different proje

[Ada] gnatmake --subdirs without project file, binding and linking

2012-07-12 Thread Arnaud Charlet
When gnatmake is invoked with --subdirs=, but without -P, the binder generated files and the executable are put by default in the specified subdirectory. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Vincent Celier * make.adb (Binding_Phase): If --subdirs was used, but

[Ada] Increase alternate stack size on hpux

2012-07-12 Thread Arnaud Charlet
To meet MINSIGSTKSZ requirement. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Tristan Gingold * s-osinte-hpux.ads: Increase alternate stack size on hpux. Index: s-osinte-hpux.ads === --- s-osinte-hpux.ads

[Ada] Move GNAT.Byte_Swapping to System

2012-07-12 Thread Arnaud Charlet
This change moves the GNAT runtime package GNAT.Byte_Swapping under System (with a renaming under GNAT for compatibility) so that the unit can be used from expanded code at a later point. No visible behaviour change (simple code reorganization), no test. Tested on x86_64-pc-linux-gnu, committed o

[Ada] Report unhandled exceptions as unhandled

2012-07-12 Thread Arnaud Charlet
On some targets, there is a catch-all handler to catch unhandled exceptions. This patch adjust the personality routine to report them as unhandled. Behavior not changed. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Tristan Gingold * raise-gcc.c: Do not include unwind-d

Re: [Patch, Fortran] Handle C_F_POINTER with a noncontiguous SHAPE=

2012-07-12 Thread Tobias Burnus
*ping* On 06/28/2012 09:34 AM, Tobias Burnus wrote: This patch generates inline code for C_F_POINTER with an array argument. One reason is that GCC didn't handle SHAPE= arguments which were noncontiguous. Actually, I just messed up my test case and didn't properly read the libgfortran/intrin

Re: [PATCH 3/6] Thread pointer built-in functions, arm

2012-07-12 Thread Ramana Radhakrishnan
On 12 July 2012 07:52, Chung-Lin Tang wrote: > ARM parts, no further notes. > ARM parts are ok, modulo approval for generic parts and no regressions with testing on arm-linux-gnueabi. Thanks, Ramana > Thanks, > Chung-Lin > > * config/arm/arm.c (arm_builtins): Remove > ARM_BUILT

Re: [patch][fortran] Include coretypes.h in .c files, not in gfortran.h

2012-07-12 Thread Tobias Burnus
On 07/07/2012 11:28 PM, Steven Bosscher wrote: I must say, I am surprised that gfortran.h includes coretypes.h. The idea always was to try and keep the front end and the back end as much separated as possible, and including coretypes.h in the most important front-end header doesn't fit in that pi

Re: new sign/zero extension elimination pass

2012-07-12 Thread Tom de Vries
Kenneth, I see I replied to your original message that had the wrong CC, I'm now CC-ing gcc-patches@gcc.gnu.org. Thanks, - Tom On 12/07/12 11:05, Tom de Vries wrote: > On 12/07/12 03:39, Kenneth Zadeck wrote: >> Tom, >> >> I have a problem with the approach that you have taken here. I believe

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-12 Thread Andreas Schwab
Dimitrios Apostolou writes: > @@ -3849,6 +3850,32 @@ sprint_ul_rev (char *s, unsigned long va >return i; > } > > +/* Write a signed HOST_WIDE_INT as decimal to a file, fast. */ > + > +void > +fprint_w (FILE *f, HOST_WIDE_INT value) > +{ > + /* python says: len(str(2**64)) == 20 */ > + ch

Re: [patch] Call free_after_parsing earlier

2012-07-12 Thread Richard Guenther
On Wed, Jul 11, 2012 at 9:39 PM, Steven Bosscher wrote: > Hello, > > GCC calls free_after_parsing in rest_of_clean_state. > That's way too late, it can be done in free_lang_data_in_cgraph instead. But that's only called with -flto ... I think it should be called in cgraph_finalize_function instea