Re: RFA: Add makefile for cross-configuration torture test

2011-04-14 Thread Joern Rennecke
Quoting Ralf Wildenhues : Can you separate the configure and the build steps into separate make targets so that one can run one but not the other? Or would that have adverse effects on the load pattern (it might, due to the way make orders scheduling of jobs)? I've added a separate target 'co

Re: [v3] Re-implement is_constructible, add is_default_constructible, is_destructible, fix PR 48526

2011-04-14 Thread Magnus Fromreide
On Thu, 2011-04-14 at 00:48 +0200, Paolo Carlini wrote: > Hi! > > over the last 2 days or so, Daniel Krugler - having filed in due course > his Copyright Assignment - finally kindly contributed to the project > shiny new std::is_constructible, std::is_default_constructible and > std::is_destruc

Re: [v3] Re-implement is_constructible, add is_default_constructible, is_destructible, fix PR 48526

2011-04-14 Thread Paolo Carlini
On 04/14/2011 10:32 AM, Magnus Fromreide wrote: This is just a nit, but why do you remove the /// is_function comments? Because was on the forward declaration, not on the implementation itself, where I wanted it. Paolo.

Re: [PATCH] add statistics counting to postreload, copy-rename, and math-opts

2011-04-14 Thread Richard Guenther
On Wed, Apr 13, 2011 at 8:43 PM, Nathan Froyd wrote: > On Wed, Apr 13, 2011 at 11:07:15AM +0200, Richard Guenther wrote: >> On Tue, Apr 12, 2011 at 5:09 PM, Nathan Froyd >> wrote: >> > Granted, but that fact should still be recorded.  The situation we have >> > today, for something like: >> > >>

Re: More of ipa-inline housekeeping

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 12:20 AM, Jan Hubicka wrote: > Hi, > this patch moves inline_summary from field in cgraph_node into its own on side > datastructure. This moves it from arcane decision of mine to split all IPA > data > into global/local datas stored in common datastructure into the scheme

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Eric Botcazou
> This is the "real" fix for PR46076 that I wanted to persue. Make > function pointer type conversions useless as to more aggressively > be able to turn indirect into direct calls. This requires that we > preserve the original type signature of the called function as > presented by the frontend.

[Patch,testsuite,AVR]: Make PROGMEM variables const.

2011-04-14 Thread Georg-Johann Lay
These test cases gcc.target/avr/trivial.c gcc.target/avr/torture/trivial.c put non-const variables in read-only section .progmem.data which causes an error. The patch rewrites the files to make respective variables real-only (and besides that fixes line endings). Johann ./testsuite 2011-04-14

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Richard Guenther
On Thu, 14 Apr 2011, Eric Botcazou wrote: > > This is the "real" fix for PR46076 that I wanted to persue. Make > > function pointer type conversions useless as to more aggressively > > be able to turn indirect into direct calls. This requires that we > > preserve the original type signature of t

Re: [Patch,testsuite,AVR]: Make PROGMEM variables const.

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > These test cases > > gcc.target/avr/trivial.c > gcc.target/avr/torture/trivial.c > > put non-const variables in read-only section .progmem.data which > causes an error. The patch rewrites the files to make respective > variables real-only (and besides that fixes line

[Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Georg-Johann Lay
The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by using 4 operands instead of 3. This runs in ICE in top of optabs.c:maybe_gen_insn. The right way to do this is to use match_dup, not match_operand. So the fix is obvious. Regenerated avr-gcc and run against avr testsuite: gcc.targe

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-14 Thread Nathan Froyd
On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: > On 03/24/2011 09:15 AM, Nathan Froyd wrote: >> + tree t = make_node (CASE_LABEL_EXPR); >> + >> + TREE_TYPE (t) = void_type_node; >> + SET_EXPR_LOCATION (t, input_location); > > As jsm and richi said, using input_location like this

Re: [PATCH PING] c++-specific bits of tree-slimming patches

2011-04-14 Thread Richard Guenther
On Thu, 14 Apr 2011, Nathan Froyd wrote: > On Fri, Apr 08, 2011 at 01:50:24PM -0400, Jason Merrill wrote: > > On 03/24/2011 09:15 AM, Nathan Froyd wrote: > >> + tree t = make_node (CASE_LABEL_EXPR); > >> + > >> + TREE_TYPE (t) = void_type_node; > >> + SET_EXPR_LOCATION (t, input_location); > >

[testsuite,AVR] test for PR46779, PR45291, PR41894

2011-04-14 Thread Georg-Johann Lay
This tests are intended to reveal the respective PRs because the test case is more stable under slight variations in code (both of application or compiler). This test case migh also be helpful for older versions of avr-gcc, in particular if PR41894 is actually fixed. 2011-04-14 Georg-Johann Lay

[PATCH] Handle more cases in get_pointer_modulus_and_residue

2011-04-14 Thread Richard Guenther
When using the C++ frontend to build gcc.dg/fold-bitand-4.c it currently fails to optimize because we don't handle &a[i] properly in get_pointer_modulus_and_residue. We do have nice conservative code in get_object_alignment that just needs splitting out. Which is what the following patch does.

[PATCH] Fix PR48590

2011-04-14 Thread Richard Guenther
We are currently not special casing alloca related builtins in the alias oracle while we can very easily do better, similar to how we handle malloc and free. The exception is BUILT_IN_STACK_RESTORE which is not tied to a particular allocation. Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: Fix PR47612

2011-04-14 Thread Michael Matz
Hi, On Wed, 13 Apr 2011, Bernd Schmidt wrote: > > I'll also note that the first hunk of your change is in a loop commented > > with "Compute upper bound, bla ...", meaning to be a heuristic, and your > > second change is this: > > It's not a heuristic. Both of these loops are necessary to comp

Re: Problem with ARM longcalls

2011-04-14 Thread Bernd Schmidt
Ping. Contains only changes outside config/arm. http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01509.html Bernd On 03/23/2011 04:46 PM, Bernd Schmidt wrote: > I've discovered a problem with -mlong-calls on ARM. The bug was first > reported against a new target, but I'd copied the relevant code f

Re: Problem with ARM longcalls

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 2:40 PM, Bernd Schmidt wrote: > Ping.  Contains only changes outside config/arm. > > http://gcc.gnu.org/m/gcc-patches/2011-03/msg01509.html Ok. Thanks, Richard. > > Bernd > > On 03/23/2011 04:46 PM, Bernd Schmidt wrote: >> I've discovered a problem with -mlong-calls on A

Re: [PATCH, ARM] PR47855 Compute attr "length" for some thumb2 insns, 2/3

2011-04-14 Thread Carrot Wei
On Fri, Apr 8, 2011 at 6:51 PM, Ramana Radhakrishnan wrote: > On 08/04/11 10:57, Carrot Wei wrote: >> >> Hi >> >> This is the second part of the fixing for >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47855 >> >> This patch contains the length computation for insn patterns >> "*arm_movqi_insn

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Dominique Dhumieres
> I have opened PR48590 for at least one issue that I see. ... The fix for pr48590 (r172427) does not speedup fatigue.f90 compiled with -fstack-arrays. Dominique

PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread H.J. Lu
We have static unsigned int get_decl_align_unit (tree decl) { unsigned int align = LOCAL_DECL_ALIGNMENT (decl); return align / BITS_PER_UNIT; } LOCAL_DECL_ALIGNMENT may increase alignment for local variable. But it is never saved. DECL_ALIGN (decl) returns the old alignment. This patch upd

[PATCH] Improve DSE a bit

2011-04-14 Thread Richard Guenther
Currently DSE does not allow for a call to be the redundant killing stmt. The following patch fixes that and also simplifies the DSE code by removing most of the domwalk stuff which wasn't necessary anymore. The alias-oracle is extended to handle some builtin calls as killing stmts so that we ca

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Richard Guenther
On Thu, 14 Apr 2011, Eric Botcazou wrote: > > This is the "real" fix for PR46076 that I wanted to persue. Make > > function pointer type conversions useless as to more aggressively > > be able to turn indirect into direct calls. This requires that we > > preserve the original type signature of t

Re: Try simplifying memory operands during optabs expansion

2011-04-14 Thread Richard Sandiford
Richard Henderson writes: > On 03/31/2011 03:19 AM, Richard Sandiford wrote: >> * recog.h (insn_operand_data): Add an "allows_mem" field. >> * genoutput.c (output_operand_data): Initialize it. >> * optabs.c (maybe_legitimize_operand_same_code): New function. >> (maybe_legitimiz

RFA: Gimple calls to "internal" functions

2011-04-14 Thread Richard Sandiford
Richard Sandiford writes: > I'm implementing the multi-vector load/store support described here: > > http://gcc.gnu.org/ml/gcc/2011-03/msg00322.html > > For the purposes of this message, the main thing is that the losds > and stores are more naturally represented as GIMPLE_CALLs rather > than

Re: RFA: Gimple calls to "internal" functions

2011-04-14 Thread Diego Novillo
On Thu, Apr 14, 2011 at 09:43, Richard Sandiford wrote: > +/* This file specifies a list of internal "functions".  These functions > +   differ from built-in functions in that they have no linkage and cannot > +   be called directly by the user.  They represent operations that are only > +   synt

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: > We have > > static unsigned int > get_decl_align_unit (tree decl) > { >  unsigned int align = LOCAL_DECL_ALIGNMENT (decl); >  return align / BITS_PER_UNIT; > } > > LOCAL_DECL_ALIGNMENT may increase alignment for local variable.  But it is > never s

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Michael Matz
Hi, On Tue, 12 Apr 2011, Dominique Dhumieres wrote: > > The resulting speed up for nf.f90 is rather remarkable. What specific > > feature of the fortran leads to a 30=>15s ? > > I think it is the automatic array in the subroutine trisolve. Note that the > speedup is rather 27->19s and may be d

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread H.J. Lu
On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther wrote: > On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: >> We have >> >> static unsigned int >> get_decl_align_unit (tree decl) >> { >>  unsigned int align = LOCAL_DECL_ALIGNMENT (decl); >>  return align / BITS_PER_UNIT; >> } >> >> LOCAL_DECL_ALI

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu wrote: > On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther > wrote: >> On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: >>> We have >>> >>> static unsigned int >>> get_decl_align_unit (tree decl) >>> { >>>  unsigned int align = LOCAL_DECL_ALIGNMENT (decl);

Re: RFA: Add makefile for cross-configuration torture test

2011-04-14 Thread Jan-Benedict Glaw
On Thu, 2011-04-14 04:12:31 -0400, Joern Rennecke wrote: > --- contrib/config-list.mk(revision 0) > +++ contrib/config-list.mk(revision 0) > @@ -0,0 +1,98 @@ [...] > +$(LIST): make-log-dir make-script-dir > + -mkdir $@ > + (cd $@ && \ > + ../../gcc/configure \ > + --target

Re: [PATCH][ARM] RTABI half-precision conversion functions

2011-04-14 Thread Andrew Stubbs
On 14/02/11 18:20, Joseph S. Myers wrote: Is there a reason you didn't add these functions to the shared libgcc (adjust t-bpabi and t-symbian accordingly, add them to libgcc-bpabi.ver at version GCC_4.6.0)? The GCC-specific names were deliberately made static-only in the expectation that they wo

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread H.J. Lu
On Thu, Apr 14, 2011 at 7:09 AM, Richard Guenther wrote: > On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu wrote: >> On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther >> wrote: >>> On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: We have static unsigned int get_decl_align_unit (tree

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 4:27 PM, H.J. Lu wrote: > On Thu, Apr 14, 2011 at 7:09 AM, Richard Guenther > wrote: >> On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu wrote: >>> On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther >>> wrote: On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: > We have >>

Re: [C++0x] Range-based for statements and ADL

2011-04-14 Thread Rodrigo Rivas
On Wed, Apr 13, 2011 at 3:46 PM, Jason Merrill wrote: > On 04/11/2011 04:50 PM, Rodrigo Rivas wrote: >> >> Because the type of the expression must have complete type *only* if >> it is an array. > > Actually, if it has class type, it must also have a complete type or the > class member lookup is i

Re: [PATCH 1/6] Linemap infrastructure for virtual locations

2011-04-14 Thread Tom Tromey
> "Dodji" == Dodji Seketeli writes: Tom> One thing to note is that there may be some code that assumes an Tom> ordering of location values. If you hand out ordinary and macro Tom> locations separately (which I think is what is going on), then code Tom> doing this may break. [...] Dodji> Now

C++ PATCH for c++/48446 (ICE with VLA)

2011-04-14 Thread Jason Merrill
The issue here was that with a complex expression in DECL_SIZE for z, when wrap_cleanups tried to protect the initializer of m it walked into the sizeof and thus the bounds expression, which it really shouldn't be messing with. This patch avoids this issue by saving bounds values which have si

C++ PATCH for c++/48557 (SFINAE failure with void operands)

2011-04-14 Thread Jason Merrill
We were just failing to check complain for this one error. Tested x86_64-pc-linux-gnu, applying to trunk. commit e807a327e3e667c8d79356cf644e493fbb82033f Author: Jason Merrill Date: Wed Apr 13 18:14:45 2011 -0400 PR c++/48557 * typeck.c (cp_build_binary_op): Don't decay void o

Re: C++ PATCH for c++/48557 (SFINAE failure with void operands)

2011-04-14 Thread Jason Merrill
On 04/14/2011 10:57 AM, Jason Merrill wrote: We were just failing to check complain for this one error. Er, actually that's the next patch. For this one, we were complaining in decay_conversion about misuse of void. I noticed that some other places avoid calling that on void operands, so th

C++ PATCH for c++/48531 (SFINAE and array of unknown bound)

2011-04-14 Thread Jason Merrill
Here's the one where we just need to check complain before giving an error. Tested x86_64-pc-linux-gnu, applying to trunk. commit a9fa1134b357ad03ac5279c926d67af75728062d Author: Jason Merrill Date: Wed Apr 13 18:17:17 2011 -0400 PR c++/48531 * init.c (build_value_init_noctor)

Minor C++ PATCH to fix lookup flags

2011-04-14 Thread Jason Merrill
When reviewing Rodrigo's patch for range-based for, I noticed that the flags for some calls to build_new_method_call were wrong. Fixed thus. Tested x86_64-pc-linux-gnu, applied to trunk. commit ea51123767c2512840f39002d2efac52111d1a7c Author: Jason Merrill Date: Tue Apr 12 22:41:48 2011 -040

[PATCH][C] Do not expand array-refs via pointer arithmetic

2011-04-14 Thread Richard Guenther
This patch adjusts the C frontend to retain array-refs in address-taking operations instead of expanding them via pointer arithmetic. As seen in PR48571 we can't re-construct array-refs in the middle-end, thus we should keep information as specified by the source level. For int a[10]; int *foo

Re: [PATCH,c++] fix PR objc++/48479, ICE in cxx_mark_addressable

2011-04-14 Thread Nathan Froyd
On Thu, Apr 07, 2011 at 09:37:17AM -0400, Nathan Froyd wrote: > My recent patch removing DECL_RTL from CONST_DECLs caused regressions in > the ObjC++ testsuite on Darwin targets. The problem is that > DECL_REGISTER was being called on CONST_DECLs; DECL_REGISTER says: > > /* In VAR_DECL and PARM_D

Remember/restore ALLOCA_FOR_VAR_P over tuples

2011-04-14 Thread Michael Matz
Hello, as my patch for stack-arrays in fortran reveals we a problem that VLA objects basically prevent all inlining to happen. They're transformed into alloca calls and those are considered to disable inlining. The (correct) fear being that inlining a bare alloca call into a loop leads to un

Re: Try simplifying memory operands during optabs expansion

2011-04-14 Thread Richard Henderson
On 04/14/2011 06:42 AM, Richard Sandiford wrote: > The !side_effects_p check is the only change from last time. > > Tested on x86_64-linux-gnu, this time on a machine set up for building > the 32-bit multilibs. Also tested on arm-linux-gnueabi. OK to install? > > Richard > > > gcc/ > *

Re: Remember/restore ALLOCA_FOR_VAR_P over tuples

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 5:18 PM, Michael Matz wrote: > Hello, > > as my patch for stack-arrays in fortran reveals we a problem that VLA > objects basically prevent all inlining to happen.  They're transformed > into alloca calls and those are considered to disable inlining.  The > (correct) fear b

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread Michael Matz
Hi, On Thu, 14 Apr 2011, Richard Guenther wrote: > > +  if (align > DECL_ALIGN (decl)) > > +    DECL_ALIGN (decl) = align; > > Shouldn't this unconditionally set DECL_ALIGN in case > LOCAL_DECL_ALINGMENT returns something smaller? Decreasing alignment of DECLs points to a problem elsewhere, so

Re: [Patch, libfortran] PR 47571 Fix bootstrap failure on alpha*-dec-osf*

2011-04-14 Thread Steve Kargl
On Mon, Apr 11, 2011 at 11:18:53PM +0300, Janne Blomqvist wrote: > > the attached patch hopefully fixes the bootstrap failure on > alpha*-dec-osf* due to said platform having clock_gettime() in librt, > supporting weak symbols but not weak undefined symbols. The patch is > the same as #38 in the P

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Michael Matz
Hi, On Thu, 14 Apr 2011, Michael Matz wrote: > no stack-arrayswith stack-arrays > no addtional options: 10.2s 8.8s > + -fwhole-program: 7.1s 8.8s > + -fwhole-program -flto: 10.1s

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread H.J. Lu
On Thu, Apr 14, 2011 at 8:26 AM, Michael Matz wrote: > Hi, > > On Thu, 14 Apr 2011, Richard Guenther wrote: > >> > +  if (align > DECL_ALIGN (decl)) >> > +    DECL_ALIGN (decl) = align; >> >> Shouldn't this unconditionally set DECL_ALIGN in case >> LOCAL_DECL_ALINGMENT returns something smaller? >

Re: Remember/restore ALLOCA_FOR_VAR_P over tuples

2011-04-14 Thread Eric Botcazou
> We have a flag for this already on the CALL_EXPR. But we don't retain it > over tuples, and hence we also don't look at it in > inline_forbidden_p_stmt. This patch fixes both. (The strange testing of > builtin-ness is because in CALL_EXPR the ALLOCA_FOR_VAR_P and > CALL_FROM_THUNK_P flags are

Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost

2011-04-14 Thread Richard Guenther
On Thu, Apr 14, 2011 at 5:48 PM, H.J. Lu wrote: > On Thu, Apr 14, 2011 at 8:26 AM, Michael Matz wrote: >> Hi, >> >> On Thu, 14 Apr 2011, Richard Guenther wrote: >> >>> > +  if (align > DECL_ALIGN (decl)) >>> > +    DECL_ALIGN (decl) = align; >>> >>> Shouldn't this unconditionally set DECL_ALIGN i

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Eric Botcazou
> I'm working on a fix along this line, it needs some tweaks elsewhere. Indeed, here's what I needed to bootstrap on x86-64/Linux. * cfgexpand.c (expand_call_stmt): Rematerialize original function type. * config/i386/i386.c (ix86_expand_builtin): Use get_callee_fndecl. -- Eric

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Richard Guenther
On Thu, 14 Apr 2011, Eric Botcazou wrote: > > I'm working on a fix along this line, it needs some tweaks elsewhere. > > Indeed, here's what I needed to bootstrap on x86-64/Linux. > > > * cfgexpand.c (expand_call_stmt): Rematerialize original function type. > * config/i386/i386.c (ix

Re: Remember/restore ALLOCA_FOR_VAR_P over tuples

2011-04-14 Thread Michael Matz
Hi, On Thu, 14 Apr 2011, Eric Botcazou wrote: > > We have a flag for this already on the CALL_EXPR. But we don't retain > > it over tuples, and hence we also don't look at it in > > inline_forbidden_p_stmt. This patch fixes both. (The strange testing > > of builtin-ness is because in CALL_E

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by > using 4 operands instead of 3. This runs in ICE in top of > optabs.c:maybe_gen_insn. > > The right way to do this is to use match_dup, not match_operand. So > the fix is obvious. > > Regenerated avr-gc

Re: [testsuite,AVR] test for PR46779, PR45291, PR41894

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > This tests are intended to reveal the respective PRs because the test > case is more stable under slight variations in code (both of > application or compiler). > > This test case migh also be helpful for older versions of avr-gcc, in > particular if PR41894 is actual

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Eric Botcazou
> I have the following, the gimple_call_chain check is to prevent > Ada bootstrap from failing. On x86? > I suppose your patch is ok, maybe with simply not wrapping the NOP_EXPR > around builtins. I can try that indeed... -- Eric Botcazou

[Patch,testsuite,avr]: add -finline-limit=0 to pr41885.c options

2011-04-14 Thread Georg-Johann Lay
This patchlet adds -finline-limit=0 to dg-options in testsuite/gcc.target/avr/torture/pr41885.c because otherwise optimizers will fold all tests and actually no test function is called when optimization is on. The test case still passes all tests. testsuite/ 2011-04-14 Georg-Johann Lay

Re: [PATCH,c++] fix PR objc++/48479, ICE in cxx_mark_addressable

2011-04-14 Thread Jason Merrill
OK. Jason

[build] Allow building libobjc_gc on Tru64 UNIX, Darwin

2011-04-14 Thread Rainer Orth
I recently tried to build with --enable-libobjc-gc. While this worked out of the box on Solaris, I ran intro trouble on both Tru64 UNIX and Darwin. On Tru64 UNIX, one needs to compile with -pthread since the boehm-gc headers include which error out if -D_REENTRANT is missing. On Darwin, the bui

Re: [testsuite,AVR] test for PR46779, PR45291, PR41894

2011-04-14 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/14 Georg-Johann Lay : >> This tests are intended to reveal the respective PRs because the test >> case is more stable under slight variations in code (both of >> application or compiler). >> >> This test case migh also be helpful for older versions of avr-gcc, in >

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/14 Georg-Johann Lay : >> The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by >> using 4 operands instead of 3. This runs in ICE in top of >> optabs.c:maybe_gen_insn. >> >> The right way to do this is to use match_dup, not match_operand. So >> the fix i

[PATCH 8/n, i386]: Merge SSE and AVX patterns using "enable" attribute.

2011-04-14 Thread Uros Bizjak
Hello! Attached patch converts "Intel SSE4.1 instructions" and remaining sections. 2011-04-14 Uros Bizjak * config/i386/sse.md (sse4_1): New mode attribute. (_blend): Macroize from avx_blend and sse4_1_blend using VF mode iterator. (_blendv): Macroize f

[PATCH 8/n, i386]: Merge SSE and AVX patterns using "enable" attribute.

2011-04-14 Thread Uros Bizjak
Hello! Attached patch converts "Intel SSE4.1 instructions" and remaining sections. 2011-04-14 Uros Bizjak * config/i386/sse.md (sse4_1): New mode attribute. (_blend): Macroize from avx_blend and sse4_1_blend using VF mode iterator. (_blendv): Macroize f

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/14 Georg-Johann Lay : >>> The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by >>> using 4 operands instead of 3. This runs in ICE in top of >>> optabs.c:maybe_gen_insn. >>> >>> The right way to do this is to use match_du

Re: [testsuite,AVR] test for PR46779, PR45291, PR41894

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/14 Georg-Johann Lay : >>> This tests are intended to reveal the respective PRs because the test >>> case is more stable under slight variations in code (both of >>> application or compiler). >>> >>> This test case migh also be helpfu

Re: [Patch,testsuite,avr]: add -finline-limit=0 to pr41885.c options

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > This patchlet adds -finline-limit=0 to dg-options in > > testsuite/gcc.target/avr/torture/pr41885.c > > because otherwise optimizers will fold all tests and actually no test > function is called when optimization is on. The test case still passes > all tests. > > > te

Re: Convert legacy m68k options to .opt aliases

2011-04-14 Thread Gunther Nikl
Joseph S. Myers wrote: > > m68k-aout was obsoleted in 4.4 and removed in 4.5 - while some OSes > with various odd object file formats are still supported, various > newer features such as LTO may not work so well with them. I am aware that generic m68k-aout as target was deprecated and is gone no

gcc-patches@gcc.gnu.org

2011-04-14 Thread Gunther Nikl
Joseph S. Myers wrote: > On Thu, 7 Apr 2011, Gunther Nikl wrote: > >> Is there a (recommended) way how a subtarget can override hook >> functions? > > The implementation of the hook should contain "if" (preferred over #if) > conditions on the particular ABI in use, which could be determined by a

Re: Reintroduce -mflat option on SPARC

2011-04-14 Thread Laurent Rougé
>> This patch reintroduce the -mflat option on SPARC. The -mfalt option was >> deprecated in february 2004 with GCC 3.4.6. Now, with the support of >> LEON processor on GCC, this option has found a new interest. > Just a couple of remarks: > - the epilogue isn't fully RTL-ized, > - delay slot fi

[lto/pph] Do not pack more bits than requested (issue4415044)

2011-04-14 Thread Diego Novillo
This is a corner case that happens not to affect LTO because the "bad" value is the last one packed. In pack_ts_type_value_fields, the last thing we pack is TYPE_ALIAS_SET, which in many cases ends up being -1. However, we request bp_pack_value to pack HOST_BITS_PER_INT (32), whereas -1 is 64 bi

RE: [build] Allow building libobjc_gc on Tru64 UNIX, Darwin

2011-04-14 Thread Nicola Pero
> I recently tried to build with --enable-libobjc-gc. While this worked > out of the box on Solaris, I ran intro trouble on both Tru64 UNIX and > Darwin. > > [...] > > The following patch fixes both issues. [...] > > Ok for mainline if both pass? Yes. [and by the way, I think you're fixing PR l

[PATCH] Fix unwind info with inline asm (PR middle-end/48597)

2011-04-14 Thread Jakub Jelinek
Hi! void foo (void) { register long s __asm ("r13"); register long t __asm ("r14"); register long u __asm ("r15"); asm volatile ("xorq %%r12, %%r12" : : : "r12"); asm volatile ("xorq %0, %0" : "=r" (s)); asm volatile ("xorq %0, %0" : "=r" (t)); asm volat

Re: PING: PATCH: PR target/46770: Use .init_array/.fini_array sections

2011-04-14 Thread H.J. Lu
On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: > On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: >> On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: >>> On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther >>> wrote: On Thu, Jan 27, 2011 at 12:12 AM, H.J. Lu wrote: > On Tue, Dec 14, 20

[PATCH] Fix sse4_1_insertps (PR target/48605)

2011-04-14 Thread Jakub Jelinek
Hi! The insertps and vinsertps insns work differently if %2 is a register resp. memory. The register is 128-bit XMM register and the upper 2 bits of the 8 bit immediate then select which of the 4 parts of that register to choose. If it is a memory though, the upper 2 bits of the 8 bit immediate

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Dominique Dhumieres
> See http://gcc.gnu.org/ml/gcc-patches/2011-04/msg01087.html . ... With this patch on top of revision 172429 (and the second patch for -fstack-arrays) I now get Date & Time : 14 Apr 2011 20:48:24 Test Name

Re: [build] Avoid ld -v error message with Sun ld on SPARC

2011-04-14 Thread Rainer Orth
David Miller writes: > Thanks Rainer, if you cons up a patch to add the ".align" directive I'll ACK > that as well. That's my plan: I'll include such a patch in my S8 to S11 bootstraps over the weekend to make sure nothing breaks. Rainer --

Re: [lto/pph] Do not pack more bits than requested (issue4415044)

2011-04-14 Thread Jakub Jelinek
On Thu, Apr 14, 2011 at 02:50:53PM -0400, Diego Novillo wrote: > @@ -1190,8 +1190,19 @@ bitpack_create (struct lto_output_stream *s) > static inline void > bp_pack_value (struct bitpack_d *bp, bitpack_word_t val, unsigned nbits) > { > - bitpack_word_t word = bp->word; > + bitpack_word_t mask,

[pph] Rebuild compilation context from PPH images (0/6) (issue4400048)

2011-04-14 Thread Diego Novillo
This patch is the first of a series of 7 patches to reconstruct the compilation context out of a PPH image. Currently, there are 32 failures in the PPH testsuite. Most are assembly miscomparisons. There are still missing bits in the images that we are not pickling properly, but I think it makes

[pph] Rebuild compilation context from PPH images (1/6) (issue4407048)

2011-04-14 Thread Diego Novillo
This test case is getting the compiler into an infinite recursive loop. I'm disabling it for now so we can keep working on the other PPH failures. Diego. * g++.dg/pph/p1mean.cc: Force syntax error. diff --git a/gcc/testsuite/ChangeLog.pph b/gcc/testsuite/ChangeLog.pph index 806e96a..a5

[pph] Rebuild compilation context from PPH images (2/6) (issue4413048)

2011-04-14 Thread Diego Novillo
When pickling type bitfields, we were not processing TYPE_ADDR_SPACE. * lto-streamer-in.c (unpack_ts_base_value_fields): Handle TYPE_ADDR_SPACE. * lto-streamer-out.c (pack_ts_base_value_fields): Likewise. diff --git a/gcc/ChangeLog.pph b/gcc/ChangeLog.pph index 6cd6bf0..6

[pph] Rebuild compilation context from PPH images (3/6) (issue4408045)

2011-04-14 Thread Diego Novillo
We were not handling TYPE_DECLs properly. They were being handled by the first if, but the second one was an 'else if'. Sigh. Tested on x86_64. Diego. * pph-streamer-in.c (pph_stream_read_tree): Fix handling of TYPE_DECLs. * pph-streamer-out.c (pph_stream_write_tree):

[pph] Rebuild compilation context from PPH images (4/6) (issue4412046)

2011-04-14 Thread Diego Novillo
This patch handles the reading of TYPE_LANG_SPECIFIC fields. Tested on x86_64. Diego. * name-lookup.c (pph_stream_write_binding_table): Handle NULL BT->CHAIN entries. (pph_stream_read_binding_table): New. * pph-streamer-in.c (pph_stream_read_lang_specific): Renam

[pph] Rebuild compilation context from PPH images (6/6) (issue4410046)

2011-04-14 Thread Diego Novillo
This patch implements the writing of TYPE_LANG_SPECIFIC fields. Tested on x86_64. * Make-lang.in (cp/name-lookup.o): Add dependency on CXX_PPH_STREAMER_H. * name-lookup.c: Include pph-streamer.h. (pph_stream_write_binding_table): New. * pph-streamer-out.c (

[pph] Rebuild compilation context from PPH images (5/6) (issue4410045)

2011-04-14 Thread Diego Novillo
This patch factors out the allocation of sorted_fields_type into a new function so it can be called from the PPH reader. * class.c (sorted_fields_type_new): Factor out of ... (finish_struct_1): ... here. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 1325260..b040449 100

[doc] Remove references to mips-tfile on MIPS

2011-04-14 Thread Rainer Orth
I noticed that there were a couple of references to mips-tfile on MIPS, but this is only used on Tru64 UNIX these days. The following patch corrects this. Included in an i386-pc-solaris2.11 bootstrap to ensure the doc changes are syntactically correct. The MIPS changes should be obvious, though

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Tobias Burnus
Michael Matz wrote: Try this patch. I've verified that capacita and nf work with it and -march=native -ffast-math -funroll-loops -fstack-arrays -O3 . In fact all of polyhedron works for me on these flags. (I've set a ulimit -s of 512MB, but I don't know if such a large amount is required). T

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Tobias Burnus
Tobias Burnus wrote: no stack-arrayswith stack-arrays + -fwhole-program -flto: 10.1s 8.9s + -fwhole-program -flto -finline-limit=600 4.8s 3.6s I wonder whether the following is special to my system* or generally true. I

[x32] PATCH: Require ia32 instead of ilp32 on pr48389.c

2011-04-14 Thread H.J. Lu
Hi, I am checking this patch into x32 branch. H.J. --- commit 9f59060d93b78a252212c621dea82b458001c6c5 Author: H.J. Lu Date: Sat Apr 9 08:18:42 2011 -0700 Require ia32 instead of ilp32 on pr48389.c. diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32 index 0081f4c..46

Re: [PATCH] Fix sse4_1_insertps (PR target/48605)

2011-04-14 Thread Uros Bizjak
On Thu, Apr 14, 2011 at 9:11 PM, Jakub Jelinek wrote: > The insertps and vinsertps insns work differently if %2 is a register > resp. memory.  The register is 128-bit XMM register and the upper 2 bits > of the 8 bit immediate then select which of the 4 parts of that register to > choose.  If it i

Re: [lto/pph] Do not pack more bits than requested (issue4415044)

2011-04-14 Thread Diego Novillo
On Thu, Apr 14, 2011 at 15:28, Jakub Jelinek wrote: > If bitpack_word_t has BITS_PER_BITPACK_WORD bits, then for > nbits = BITS_PER_BITPACK_WORD this will be undefined. > Use say > mask = ((bitpack_word_t) 2 << (nbits - 1)) - 1; > or something similar (assertion ensures that nbits isn't 0). Quit

Re: [doc] Remove references to mips-tfile on MIPS

2011-04-14 Thread Richard Sandiford
Rainer Orth writes: > Ok for mainline if that passes? Definitely, thanks. Richard > 2011-04-08 Rainer Orth > > * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Remove. > * config/mips/mips.opt (mmips-tfile): Remove. > > * doc/install.texi (Specific, mips-*-*): Move mips-tfile

Re: Implement stack arrays even for unknown sizes

2011-04-14 Thread Dominique Dhumieres
I have forgotten to mentionned that I have a variant of fatigue in which I have done the inlining manually along with few other optimizations and the timing for it is [macbook] lin/test% gfc -Ofast fatigue_v8.f90 [macbook] lin/test% time a.out > /dev/null 2.793u 0.002s 0:02.79 100.0%0+0k 0+1io

Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless

2011-04-14 Thread Eric Botcazou
> I suppose your patch is ok, maybe with simply not wrapping the NOP_EXPR > around builtins. Here's what I've installed after bootstrapping/regtesting on x86_64-suse-linux. 2011-04-14 Eric Botcazou * cfgexpand.c (expand_call_stmt): Rematerialize the original function type if

[pph] Macro Validation Correction (issue4425041)

2011-04-14 Thread Lawrence Crowl
An earlier change reduced the number of bits in cpp_hashnode.directive_index from 7 to 5, as that was sufficient for indexing the directives. Tom Tromey asked for a static check on the size. This patch adds that check. Unfortunately, five bits are not sufficient for the alternate use of cpp_has

Ping Re: [patch, ARM] Fix PR48325, support POST_INC/PRE_DEC for NEON struct modes

2011-04-14 Thread Chung-Lin Tang
Ping. On 2011/3/31 10:57 PM, Chung-Lin Tang wrote: > This PR doesn't exactly trigger currently on trunk; a REG_DEAD note that > occurs in trunk, but not in the 4.5-based compilers which this bug was > reported for, currently blocks auto-inc-dec from doing its job, and just > happens to avoid this

Re: PATCH [trunk] gengtype should generate ggc_alloc macros in plugin mode on for plugin files

2011-04-14 Thread Laurynas Biveinis
2011/4/11 Basile Starynkevitch : > On Fri, 8 Apr 2011 19:55:51 +0200 > Basile Starynkevitch wrote: > >> Committed revision 172203 (on trunk). >> >> Actually, the above committed patch is better than nothing, but not >> perfect. It happens to generate ggc_alloc macros for things which are >> not de

Go patch committed: Use the backend interface for select statements

2011-04-14 Thread Ian Lance Taylor
This patch to the Go frontend uses the backend interface for select statements. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2011-04-14 Ian Lance Taylor * go-gcc.cc (Backend::error_statement): New function. Index: gcc/go/go-gcc.cc

Re: [Patch, libfortran] PR 47571 Fix bootstrap failure on alpha*-dec-osf*

2011-04-14 Thread Janne Blomqvist
On Thu, Apr 14, 2011 at 18:27, Steve Kargl wrote: > On Mon, Apr 11, 2011 at 11:18:53PM +0300, Janne Blomqvist wrote: >> >> the attached patch hopefully fixes the bootstrap failure on >> alpha*-dec-osf* due to said platform having clock_gettime() in librt, >> supporting weak symbols but not weak un

  1   2   >