Re: [Patch, Fortran] PR51055 - accept non-spec-expr i in allocate(character(len=i)::s)

2012-05-20 Thread Tobias Burnus
*ping* On Tue, 15 May 2012 12:26, Tobias Burnus wrote: A rather simple patch. Build and regtested on x86-64-linux. OK for the trunk? I think that is the last patch required for commonly used code. Remaining are issues with array constructors and concatenations - and, of course,

[Ada] fix gnat_write_global_declarations glitch in LTO mode

2012-05-20 Thread Eric Botcazou
The routine uses an anonymous static variable and this breaks in LTO mode because a DECL_NAME is expected. Tested on i586-suse-linux, applied on the mainline and 4.7 branch. 2012-05-20 Eric Botcazou ebotca...@adacore.com * gcc-interface/utils.c (gnat_write_global_declarations): Put

Re: Symbol table 22/many: handle all aliases through the symtab

2012-05-20 Thread Eric Botcazou
* cgraphunit.c (handle_alias_pairs): Cleanup; handle all types of aliases. This slightly broke error recovery for: extern int var __attribute__ ((alias (undef))); Before: ~/build/gcc/native32/gcc/cc1 -quiet t.c t.c:1:12: error: 'var' aliased to undefined symbol 'undef' extern int var

Re: [Fortran, patch] PR 48831 - Constant expression (PARAMETER array element) rejected as nonconstant

2012-05-20 Thread Tobias Burnus
Hi Alessandro, Alessandro Fanfarillo wrote: in attachment there's a patch for PR 48831, it also includes a new test case suggested by Tobias Burnus. The patch is bootstrapped and tested on x86_64-unknown-linux-gnu. Please try to ensure that your patch has a text mime type - it shows up as

Re: Symbol table 22/many: handle all aliases through the symtab

2012-05-20 Thread Jan Hubicka
* cgraphunit.c (handle_alias_pairs): Cleanup; handle all types of aliases. This slightly broke error recovery for: extern int var __attribute__ ((alias (undef))); Before: ~/build/gcc/native32/gcc/cc1 -quiet t.c t.c:1:12: error: 'var' aliased to undefined symbol 'undef'

PATCH: PR target/53425: No warnings are given for -mno-sse

2012-05-20 Thread H.J. Lu
Hi, We should warn passing SSE vector argument without SSE enabled changes the ABI for 64-bit. Tested on Linux/x86-64. OK to install? Thanks. H.J. --- gcc/ 2012-05-20 H.J. Lu hongjiu...@intel.com PR target/53425 * config/i386/i386.c (type_natural_mode): Warn passing SSE

PATCH: PR target/53383: Allow -mpreferred-stack-boundary=3 on x86-64

2012-05-20 Thread H.J. Lu
Hi, This patch allows -mpreferred-stack-boundary=3 on x86-64 when SSE is disabled. Since this option changes ABI, I also added a warning for -mpreferred-stack-boundary=3. OK for trunk? Thanks. H.J. PR target/53383 * doc/invoke.texi: Add a warning for

Updating general info in tree-parloops.c

2012-05-20 Thread Razya Ladelsky
Hi, I updated some of the info in tree-parloops.c, like adding myself to the contributors, and updating the TODO list, both long overdue... I also update the wiki http://gcc.gnu.org/wiki/AutoParInGCC and added a link to it from tree-parloops.c. If there are no objections, I will commit as

[committed] Fix PR rtl-optimzation/53373 on PA

2012-05-20 Thread John David Anglin
The attached patch changes the PIC PA call patterns to hide the internal games we play with the PIC register until after reload. As such, the call value patterns are now single sets. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave -- J. David Anglin

PATCH: Add RDRND, F16C and FSGSBASE support to -march=native

2012-05-20 Thread H.J. Lu
Hi, This patch adds RDRND, F16C and FSGSBASE support to -march=native. Tested on Linux/x86-64. OK for trunk, 4.7 and 4.6? Thanks. H.J. --- 2012-05-20 H.J. Lu hongjiu...@intel.com * config/i386/driver-i386.c (host_detect_local_cpu): Support RDRND, F16C and FSGSBASE. diff

PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread H.J. Lu
Hi, rdrandmode_1 must be marked with unspec_volatile since it returns a different value every time. OK for trunk, 4.7 and 4.6? Thanks. H.J. PR target/53416 * config/i386/i386.md (UNSPEC_RDRAND): Renamed to ... (UNSPECV_RDRAND): This. (rdrandmode_1):

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread Jakub Jelinek
On Sun, May 20, 2012 at 10:04:26AM -0700, H.J. Lu wrote: rdrandmode_1 must be marked with unspec_volatile since it returns a different value every time. OK for trunk, 4.7 and 4.6? A testcase for this would be nice (runtime is not possible, since the RNG in theory could return the same value

fix cross build

2012-05-20 Thread Nathan Sidwell
In building a ppc cross compiler using a freshly built native compiler, I encountered an ICE in iterative_hash_expr compiling c-lex.c. I extracted the attached testcase, showing the problem is with statement expressions. Investigation showed I_H_E seeing BLOCK and BIND_EXPR nodes, which is was

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread H.J. Lu
On Sun, May 20, 2012 at 10:19 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at 10:04:26AM -0700, H.J. Lu wrote: rdrandmode_1 must be marked with unspec_volatile since it returns a different value every time.  OK for trunk, 4.7 and 4.6? A testcase for this would be nice

[patch] Fix array type merging in LTO mode

2012-05-20 Thread Eric Botcazou
Hi, since http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00833.html, canonical type merging for arrays takes hours instead of minutes for big Ada applications. The problem is that iterative_hash_canonical_type doesn't hash TYPE_MIN_VALUE and TYPE_MAX_VALUE for integer types anymore, so

Re: Turn check macros into functions. (issue6188088)

2012-05-20 Thread Richard Henderson
On 05/18/2012 04:48 PM, Diego Novillo wrote: We can do this in trunk today using a variant of Lawrence's original patch (http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01649.html). This uses no C++ features, though it weakens type checking by removing away constness. In the cxx-conversion

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread Jakub Jelinek
On Sun, May 20, 2012 at 10:37:13AM -0700, H.J. Lu wrote: On Sun, May 20, 2012 at 10:19 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at 10:04:26AM -0700, H.J. Lu wrote: rdrandmode_1 must be marked with unspec_volatile since it returns a different value every time.  OK for

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread H.J. Lu
On Sun, May 20, 2012 at 11:15 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at 10:37:13AM -0700, H.J. Lu wrote: On Sun, May 20, 2012 at 10:19 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at 10:04:26AM -0700, H.J. Lu wrote: rdrandmode_1 must be marked with

Re: PATCH: Add RDRND, F16C and FSGSBASE support to -march=native

2012-05-20 Thread Uros Bizjak
On Sun, May 20, 2012 at 6:43 PM, H.J. Lu hongjiu...@intel.com wrote: This patch adds RDRND, F16C and FSGSBASE support to -march=native. Tested on Linux/x86-64.  OK for trunk, 4.7 and 4.6? 2012-05-20  H.J. Lu  hongjiu...@intel.com        * config/i386/driver-i386.c (host_detect_local_cpu):

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread Andrew Pinski
On Sun, May 20, 2012 at 11:37 AM, H.J. Lu hjl.to...@gmail.com wrote: On Sun, May 20, 2012 at 11:15 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at 10:37:13AM -0700, H.J. Lu wrote: On Sun, May 20, 2012 at 10:19 AM, Jakub Jelinek ja...@redhat.com wrote: On Sun, May 20, 2012 at

[DF] Generate REFs in REGNO order

2012-05-20 Thread Dimitrios Apostolou
Hello list, I'm resubmitting this patch from last year's GSOC which speeds up compilation by avoiding thousands of calls to qsort(). Measured again it's impact on compilation speed, this time compiling (cc1) gcc's reload.c on i386: orig: 0.734s patched:0.720s Tested on

Re: PATCH: PR target/53425: No warnings are given for -mno-sse

2012-05-20 Thread Uros Bizjak
On Sun, May 20, 2012 at 4:15 PM, H.J. Lu hongjiu...@intel.com wrote: We should warn passing SSE vector argument without SSE enabled changes the ABI for 64-bit. Tested on Linux/x86-64.  OK to install? 2012-05-20  H.J. Lu  hongjiu...@intel.com        PR target/53425        *

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread Uros Bizjak
On Sun, May 20, 2012 at 8:43 PM, Andrew Pinski pins...@gmail.com wrote: #include stdio.h  int  main(int argc, char **argv)  {  unsigned int number = 0;  int result0, result1, result2, result3;  result0 = __builtin_ia32_rdrand32_step (number);  result1 = __builtin_ia32_rdrand32_step

Re: Turn check macros into functions. (issue6188088)

2012-05-20 Thread Diego Novillo
On 12-05-20 13:59 , Richard Henderson wrote: On 05/18/2012 04:48 PM, Diego Novillo wrote: We can do this in trunk today using a variant of Lawrence's original patch (http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01649.html). This uses no C++ features, though it weakens type checking by removing

Re: PATCH: PR target/53425: No warnings are given for -mno-sse

2012-05-20 Thread H.J. Lu
On Sun, May 20, 2012 at 11:57 AM, Uros Bizjak ubiz...@gmail.com wrote: On Sun, May 20, 2012 at 4:15 PM, H.J. Lu hongjiu...@intel.com wrote: We should warn passing SSE vector argument without SSE enabled changes the ABI for 64-bit. Tested on Linux/x86-64.  OK to install? 2012-05-20  H.J. Lu  

Re: PATCH: PR target/53416: Wrong code when optimising loop involving _rdrand32_step

2012-05-20 Thread H.J. Lu
On Sun, May 20, 2012 at 12:03 PM, Uros Bizjak ubiz...@gmail.com wrote: On Sun, May 20, 2012 at 8:43 PM, Andrew Pinski pins...@gmail.com wrote: #include stdio.h  int  main(int argc, char **argv)  {  unsigned int number = 0;  int result0, result1, result2, result3;  result0 =

[PATCH, 4.6] Fix PR53170: missing target c++11 selector

2012-05-20 Thread Michael Hope
The testsuite for PR52796 uses the 'target c++11' selector which doesn't exist in 4.6. This patch backports the selector, clearing the 'ERROR: g++.dg/cpp0x/variadic-value1.C: syntax error in target selector target c++11 for dg-do 2 run { target c++11 } ' errors which have appeared in recent

Re: [RFA] leb128.h: New file.

2012-05-20 Thread Doug Evans
Ping. On Thu, May 17, 2012 at 11:29 AM, Doug Evans d...@google.com wrote: Hi. This is a slightly modified version of my previous patch. ref: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00962.html The only change is to make the result of the functions an int instead of a const pointer.

[PATCH] Fix PR53183, libgcc does not always figure out the size of double/long double

2012-05-20 Thread Andrew Pinski
The problem here is that when libgcc goes to try to figure out the size of double/long double, it includes some headers. But those headers does not exist when doing a stage1 Linux cross compiler build. This fixes the problem having configure not include those headers. OK for the trunk and the

Re: Symbol table 21/many: analyze initializers of external vars

2012-05-20 Thread H.J. Lu
On Thu, May 17, 2012 at 9:42 AM, Jan Hubicka hubi...@ucw.cz wrote: Hi, C++ virtual tables keyed to other compilation units are represented as DECL_EXTERNAL variables with constructor known. Knowhing the constructor helps constant folding to do devirtualization. At the moment these

rs6000.c forward declaration cleanup

2012-05-20 Thread Alan Modra
This removes rather a lot of forward declarations in rs6000.c, most of which existed to satisfy an early TARGET_INITIALIZER. Now that the TARGET_INITIALIZER has been moved to the end of rs6000.c, they become unnecessary and wrongly give the impression that rs6000.c style is to declare functions

Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-20 Thread Jason Merrill
On 05/15/2012 10:17 AM, Dodji Seketeli wrote: It fixes the test case gcc.dg/cpp/paste12.c because that test case runs with -ftrack-macro-expansion turned off. Otherwise, you are right that the issue exists only when we aren't tracking virtual locations. I still don't understand why this

[RS6000] save/restore reg tidy

2012-05-20 Thread Alan Modra
On Tue, May 08, 2012 at 08:02:39PM +0930, Alan Modra wrote: I also make use of gen_frame_store and siblings that I invented for generating the eh info, elsewhere in rs6000.c where doing so is blindingly obvious. We could probably use them in other places too, but I'll leave that for later.

Fix negation in stack_protect_test docs. Heads-up: prediction bug

2012-05-20 Thread Hans-Peter Nilsson
The label is for branching *around* a block calling a noreturn function. See also the open-coded version which calls emit_cmp_and_jump_insns with EQ. All ports defining it seem ok. They'd notice very quickly, no code compiled with -fstack-protector code requiring stack-protection would work.

[RS6000] out-of-line save/restore conditions

2012-05-20 Thread Alan Modra
Currently, powerpc-linux gcc -Os -mno-multiple uses out-of-linux gpr save and restore functions when saving/restoring just one gpr. That's quite silly since the function call requires more instructions and is slower than an inline save/restore. The only case where it might win is when no fprs