Fix PR target/51921

2012-02-15 Thread Eric Botcazou
This fixes the regression in the frame unwinding support on SPARC/Solaris 11 present on the mainline and 4.6 branch. Tested (by me) on 6 differents OS versions of Solaris 8, 9 and 10 and on Solaris 11 by Ian and Rainer. Applied on the mainline and 4.6 branch. 2012-02-15 Eric Botcazou

[Ada] Fix ICE on function call returning volatile record type

2012-02-15 Thread Eric Botcazou
This is a regression present on the mainline: the compiler aborts on the access to a component of the value returned by a function call, if the return type is a volatile record type that isn't controlled or tagged. Tested on i586-suse-linux, applied on the mainline. 2012-02-15 Eric Botcazou

Re: [PATCH, libitm]: GTM_longjmp: Jump indirect from memory address

2012-02-15 Thread Uros Bizjak
On Tue, Feb 14, 2012 at 8:52 PM, Richard Henderson r...@redhat.com wrote: On 02/14/2012 10:26 AM, Uros Bizjak wrote:  #ifdef __x86_64__ +     cfi_def_cfa(%rsi, 0)       movq    (%rsi), %rcx       movq    8(%rsi), %rbx       movq    16(%rsi), %rbp @@ -119,20 +120,21 @@       movq    

[Ada] Fix printing of class-wide tagged type variable in GDB

2012-02-15 Thread Eric Botcazou
This is a regression present on the mainline and which stems from enabling -feliminate-unused-debug-types by default in Ada. We fail to emit the debugging information for tagged types when only the associated class-wide type is referenced in the source code. Tested on i586-suse-linux, applied

[Ada] Fix ICE on deferred constant with variant record type

2012-02-15 Thread Eric Botcazou
This is a regression present on the mainline: the compiler aborts on a deferred constant initialized with an aggregate and whose type is a discriminated record type with a variant part and which, ultimately, contains a component whose type is controlled or tagged. Tested on i586-suse-linux,

Re: [PATCH] Fix PR52178

2012-02-15 Thread Richard Guenther
On Wed, 15 Feb 2012, Eric Botcazou wrote: This fixes PR52178, the failure to bootstrap Ada with LTO (well, until you hit the next problem). A self-referential DECL_QUALIFIER makes us think that a QUAL_UNION_TYPE type is of variable-size which makes us stream that type locally, wrecking

[PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-15 Thread Christian Bruel
Hello, This patch fixes a regression when folding a cast cond expression to a constant in case label. The problem came from the removal of the lines in c-common.c:check_case_value /* ??? Can we ever get nops here for a valid case value? We shouldn't for C. */ STRIP_TYPE_NOPS (value);

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Richard Guenther
On Tue, Feb 14, 2012 at 6:47 PM, Richard Henderson r...@redhat.com wrote: On 02/14/2012 08:46 AM, Aldy Hernandez wrote: The call to ipa_tm_diagnose_tm_safe() does nothing because there are no longer any calls in the function, since the function call has been inlined: f () { bb 2:  

Re: [PATCH] Prefer reg as first operand in commutative operator

2012-02-15 Thread Paulo J. Matos
On 14/02/12 14:10, Jakub Jelinek wrote: On Tue, Feb 14, 2012 at 02:05:30PM +, Paulo J. Matos wrote: I think the register allocator will generate good code using % if you make your predicate nonimmediate_operand in operand 1: (define_insn iorqi3 [(set (match_operand:QI 0 register_operand

Re: Backported 6 patches to 4.6 branch

2012-02-15 Thread Richard Guenther
On Wed, Feb 15, 2012 at 4:47 AM, Kenny Simpson theonetrueke...@yahoo.com wrote: Are any other recent trunk fixes to be backported - like the wrong-code bugs: PR tree-optimization/50444, PR tree-optimization/51528, or PR tree-optimization/46886 ? I'll backport 46886 but like to defer 50444

Re: [PATCH] Prefer reg as first operand in commutative operator

2012-02-15 Thread Jakub Jelinek
On Wed, Feb 15, 2012 at 10:04:15AM +, Paulo J. Matos wrote: It doesn't look like you can actually do that because, according to the internals manual: For a named pattern, the condition (if present) may not depend on the data in the insn being matched, but only the target-machine-type

Re: [patch] [4.6] Backport strict-volatile-bitfields fix PR51200

2012-02-15 Thread Richard Guenther
On Wed, Feb 15, 2012 at 8:23 AM, Ye Joey joey.ye...@gmail.com wrote: Ping^2 All hunks apart from the expr.c hunk from 182545 are ok (thus, all hunks that are explicitly guarded with -fstrict-volatile-bitfields). Please use -p for diffs, I couldn't spot the place in expr.c you patch, the

[Patch Darwin] fix missing __USER_LABEL_PREFIX__ on extended identifiers.

2012-02-15 Thread Iain Sandoe
I noticed when working on GAS for darwin that we fail to prepend the user label prefix for extended identifiers. fixed as below, OK for trunk/when? Iain gcc: * config/darwin.h (ASM_OUTPUT_LABELREF): Add user label prefix for extended identifiers. diff --git

Re: [PATCH] Fix PR50561

2012-02-15 Thread Tobias Grosser
On 02/15/2012 01:14 PM, Richard Guenther wrote: This patch by Tobias fixes PR50561. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Thanks Richard. Tobi

RE: [libitm] Link with -litm and -pthread

2012-02-15 Thread Greta Yorsh
This patch causes all tm tests to fail on arm-none-eabi target that doesn't support -pthread command line option: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52259 -Original Message- From: Eric Botcazou [mailto:ebotca...@adacore.com] Sent: 11 February 2012 19:24 To: Jack Howarth Cc:

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Aldy Hernandez
On 02/15/12 03:48, Richard Guenther wrote: On Tue, Feb 14, 2012 at 6:47 PM, Richard Hendersonr...@redhat.com wrote: On 02/14/2012 08:46 AM, Aldy Hernandez wrote: The call to ipa_tm_diagnose_tm_safe() does nothing because there are no longer any calls in the function, since the function call

Go patch committed: Avoid crashes on erroneous input

2012-02-15 Thread Ian Lance Taylor
This patch to the Go frontend avoids some compiler crashes on erroneous inputs. It also makes some minor fixes to some comments. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 4f7eddf7a851 go/backend.h --- a/go/backend.h Tue Feb 14 12:39:26

Re: Ping #1: [Committed,testsuite]: Fix testcase that bangs long and int against void*

2012-02-15 Thread Georg-Johann Lay
Georg-Johann Lay wrote: Jakub Jelinek wrote: On Wed, Feb 01, 2012 at 02:00:53PM +0100, Georg-Johann Lay wrote: * gcc.dg/lto/20091013-1_1.c: xfail for avr. * gcc.dg/lto/20091013-1_2.c: xfail for avr. If it is just because of the warnings, can't you add -Wno-int-to-pointer-cast

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Richard Guenther
On Wed, Feb 15, 2012 at 3:30 PM, Aldy Hernandez al...@redhat.com wrote: On 02/15/12 03:48, Richard Guenther wrote: On Tue, Feb 14, 2012 at 6:47 PM, Richard Hendersonr...@redhat.com  wrote: On 02/14/2012 08:46 AM, Aldy Hernandez wrote: The call to ipa_tm_diagnose_tm_safe() does nothing

[Patch,AVR]: Fix missing prototype warning for ACCUMULATE_OUTGOING_ARGS

2012-02-15 Thread Georg-Johann Lay
Some parts outside the backend use ACCUMULATE_OUTGOING_ARGS without including tm_p.h which lead to a build warning because avr.h does #define ACCUMULATE_OUTGOING_ARGS avr_accumulate_outgoing_args() This patcs moved the prototype from avr-protos.h to avr.h: * config/avr/avr-protos.h

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Aldy Hernandez
[rth, please correct me if I have misrepresented the TM semantics and rules]. On 02/15/12 09:04, Richard Guenther wrote: Ok, I had a look at the bugreport and am curios why __attribute__((always_inline)) static void asmfunc(void) { __asm__ (); } __attribute__((transaction_safe)) static

Re: [PATCH, 4.6 regression]. New error: case label does not reduce

2012-02-15 Thread Joseph S. Myers
On Wed, 15 Feb 2012, Christian Bruel wrote: Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem. looks safe from my testing, because the loc is inserted using 'protected_set_expr_location', whereas no loc for a constant case doesn't seem to introduce new problems with the

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-15 Thread Paolo Bonzini
On 02/15/2012 06:09 PM, Rainer Orth wrote: Paolo Bonzini bonz...@gnu.org writes: This must be a separate macro in acinclude.m4 that is AC_REQUIREd from gcc_AC_INITFINI_ARRAY. Here's an updated patch that does so. During testing, I found one additional complication, though. With the Sun

Re: [Patch Darwin] fix missing __USER_LABEL_PREFIX__ on extended identifiers.

2012-02-15 Thread Mike Stump
On Feb 15, 2012, at 2:21 AM, Iain Sandoe wrote: I noticed when working on GAS for darwin that we fail to prepend the user label prefix for extended identifiers. Does this match the native compiler on the platform? This is abi changing, and we can't do it, unless it mismatches the native

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Richard Henderson
On 02/15/2012 01:48 AM, Richard Guenther wrote: Hmm. I think you rather want to teach local_pure_const about TM properties you want to know and have them propagated properly (of course unless pure/const which is about optimization and has an easy fallback default yours wouldn't have that -

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Jakub Jelinek
On Wed, Feb 15, 2012 at 09:29:18AM -0800, Richard Henderson wrote: On 02/15/2012 01:48 AM, Richard Guenther wrote: Hmm. I think you rather want to teach local_pure_const about TM properties you want to know and have them propagated properly (of course unless pure/const which is about

[v3, libgomp, build] Fix Solaris symbol versioning (PR libstdc++/52188)

2012-02-15 Thread Rainer Orth
Prompted by the suggestions in the PR what to do about the new exports of _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv at GLIBCXX_3.4.5 on Solaris, I've followed the preprocess *.ver files route Jakub suggested to just omit those two on

Re: [Patch Darwin] fix missing __USER_LABEL_PREFIX__ on extended identifiers.

2012-02-15 Thread Iain Sandoe
On 15 Feb 2012, at 17:16, Mike Stump wrote: On Feb 15, 2012, at 2:21 AM, Iain Sandoe wrote: I noticed when working on GAS for darwin that we fail to prepend the user label prefix for extended identifiers. Does this match the native compiler on the platform? This is abi changing, and we

Re: [PATCH?, 4.7 regression] Crash in ira-costs.c with -fschedule-insns -fsched-pressure -fdump-rtl-sched1

2012-02-15 Thread Vladimir Makarov
On 02/14/2012 12:00 PM, Ulrich Weigand wrote: Hello, compiling anything, even just an empty function, with -fschedule-insns -fsched-pressure -fdump-rtl-sched1 causes the compiler to crash: Program received signal SIGSEGV, Segmentation fault. 0x0840d9e0 in REG_N_REFS (regno=58) at

Re: [PATCH?, 4.7 regression] Crash in ira-costs.c with -fschedule-insns -fsched-pressure -fdump-rtl-sched1

2012-02-15 Thread Ulrich Weigand
Vladimir Makarov wrote: On 02/14/2012 12:00 PM, Ulrich Weigand wrote: This is fixed by the following patch. However, I'm not quite sure if this is the best way to fix the problem, given that the REG_N_REFS use occurs only for debug output purposes -- should we actually do the work to

[testsuite] XFAIL objc.dg/stabs-1.m on IRIX (PR target/52152)

2012-02-15 Thread Rainer Orth
Like other MIPS ELF targets, the mips-sgi-irix6.5 configuration doesn't include dbxelf.h, causing objc.dg/stabs-1.m to FAIL. Same cure as in Richard's patch. Tested with the appropriate runtest invocations, installed on mainline. Rainer 2012-02-11 Rainer Orth

[libgo] Detect Solaris 8/9 SPARC makecontext

2012-02-15 Thread Rainer Orth
The libgo setcontext TLS configure test was failing on Solaris 8 and 9/SPARC, breaking bootstrap due to the unhandled case in runtime/proc.c. This turned out to be a known issue, documented in the makecontext(3C) manpage: NOTES The semantics of the uc_stack member of the ucontext_t

Re: PR middle-end/52141: ICE due to asm statement

2012-02-15 Thread Jakub Jelinek
On Wed, Feb 15, 2012 at 11:59:15AM -0600, Aldy Hernandez wrote: Hmmm, isn't %K for trees? We're talking gimple, and FUNCTION_DECLs, which don't have a TREE_BLOCK, here. Gimple stmts have gimple_block, I guess you'd need to create some tree and set its TREE_BLOCK and EXPR_LOCATION from

[PATCH] Fix PR 52199 on power7 (VEC_DUPLICATE)

2012-02-15 Thread Michael Meissner
This patch fixes PR 52199, which shows up on power7 systems when the compiler is vectorizing DImode operations, and the vector duplicate code was not prepared to accept CONST and SYMBOL_REF's. I have done a bootstrap and make compare, and there were no regressions. Is this ok to install? I will

[patch] Poison SMALL_REGISTER_CLASSES

2012-02-15 Thread Steven Bosscher
Hello, While going through some old patches of mine, I noticed this: config/rl78/rl78.h:#define SMALL_REGISTER_CLASSES 1 config/rx/rx.h:#define SMALL_REGISTER_CLASSES 0 Can't possibly work, that target macro was replaced with a hook. Attached patch OK for trunk? Ciao!

Re: [patch] Poison SMALL_REGISTER_CLASSES

2012-02-15 Thread Steven Bosscher
On Wed, Feb 15, 2012 at 7:36 PM, Steven Bosscher stevenb@gmail.com wrote: Hello, While going through some old patches of mine, I noticed this: config/rl78/rl78.h:#define SMALL_REGISTER_CLASSES               1 config/rx/rx.h:#define SMALL_REGISTER_CLASSES           0 Can't possibly

Re: [patch] Poison SMALL_REGISTER_CLASSES

2012-02-15 Thread DJ Delorie
I would classify these as obvious but please make sure they go in before the poison patch ;-) And this will be needed to make those ports do what was intended: * config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with hook. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES.

Re: [PR52001] too many cse reverse equiv exprs (take2)

2012-02-15 Thread Richard Sandiford
Alexandre Oliva aol...@redhat.com writes: On Feb 13, 2012, Richard Sandiford rdsandif...@googlemail.com wrote: does this avoid the kind of memrefs_conflict_p cycle I was seeing in: I don't know that it does, I'd missed that bit. If you still have a preprocessed testcase, I'd be glad to give

Re: [patch] Poison SMALL_REGISTER_CLASSES

2012-02-15 Thread Steven Bosscher
On Wed, Feb 15, 2012 at 7:59 PM, DJ Delorie d...@redhat.com wrote: I would classify these as obvious but please make sure they go in before the poison patch ;-) And this will be needed to make those ports do what was intended:       * config/rl78/rl78.h: Replace SMALL_REGISTER_CLASSES with

Re: [Patch Darwin] fix missing __USER_LABEL_PREFIX__ on extended identifiers.

2012-02-15 Thread Mike Stump
On Feb 15, 2012, at 9:38 AM, Iain Sandoe wrote: So, this just brings us into line with the current system compiler. Ah, the patch is ok. Perfect, thanks.

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-15 Thread Patrick Marlier
Here the committed patch approved off-list by Mike Stump which fixed PR/52042. Tested on darwin10/11 with x86_64. PS: this is my first commit so I hope I get it right. Otherwise do not hesitate to yell at me. Thanks. -- Patrick. 2012-02-15 Iain Sandoe ia...@gcc.gnu.org Patrick

Re: obvious(?) typo in libstdc++-v3/src/c++98/locale.cc

2012-02-15 Thread Benjamin Kosnik
The typo is obvious, but whether or not the wrapped code still works isn't (to me). * src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix typo. Please check this in. -benjamin

[Patch,AVR]: Add builtins.def and fix some ICE, add tests

2012-02-15 Thread Georg-Johann Lay
This patch introduces a new file builtins.def that is used as central registry to hold built-ins' information. The file is used by defining DEF_BUILTIN macre and then including the file as described in the head comment of builtins.def. Up to here it's all code clean-up and no functional change.

Re: obvious(?) typo in libstdc++-v3/src/c++98/locale.cc

2012-02-15 Thread DJ Delorie
The typo is obvious, but whether or not the wrapped code still works isn't (to me). * src/c++98/locale.cc (locale::facet::_S_get_c_locale): Fix typo. Please check this in. Done. Thanks!

Re: [patch] Poison SMALL_REGISTER_CLASSES

2012-02-15 Thread Mike Stump
On Feb 15, 2012, at 11:09 AM, Steven Bosscher wrote: On Wed, Feb 15, 2012 at 7:59 PM, DJ Delorie d...@redhat.com wrote: I would classify these as obvious but please make sure they go in before the poison patch ;-) And this will be needed to make those ports do what was intended: *

[PATCH][Cilkplus] Patch to fix a bug in 32 bit Metadata

2012-02-15 Thread Iyer, Balaji V
Hello Everyone, This patch is for the Cilkplus branch affecting the C and C++ compilers. This patch will fix a problem in metadata dwarf code generation part when we are trying to catch the register number when a spill occurs. Thanks, Balaji V. Iyer. diff --git a/gcc/ChangeLog.cilk

Re: [libgo] Detect Solaris 8/9 SPARC makecontext

2012-02-15 Thread Ian Lance Taylor
Rainer Orth r...@cebitec.uni-bielefeld.de writes: 2012-02-13 Rainer Orth r...@cebitec.uni-bielefeld.de * configure.ac (libgo_cv_lib_makecontext_stack_top): Set on sparc*-*-solaris2.[89]*. (MAKECONTEXT_STACK_TOP): Define if appropriate.

Re: [trans-mem,darwin] PR/52042 find tm_clone_table with PIE

2012-02-15 Thread Mike Stump
On Feb 15, 2012, at 11:18 AM, Patrick Marlier wrote: PS: this is my first commit so I hope I get it right. Otherwise do not hesitate to yell at me. Thanks. I know of two people that will test and yell, if anything goes wrong. I'll spin up a build...

[pph] Merge inline function definitions. (issue5677058)

2012-02-15 Thread Lawrence Crowl
This patch merges inline functions where a plain declaration is read from a pph file after an earlier pph file provides the full definition. Making this merge happen required refactoring the several pph routines. Ideally, we should have merge versions of the common tree streamer. However, we

[patch, committed] invoke.texi: clean up n-bit/byte/word modifiers

2012-02-15 Thread Sandra Loosemore
This patch is another installment in my endless(?) series of copy-edits to the GCC manual. Here, I've fixed up a number of places to uniformly use e.g. 32-bit int instead of sometimes that and sometimes 32 bit and sometimes 32bit. And, as a noun phrase, it's properly 32 bits. Likewise

[libitm, darwin] PR52220 move dummy functions definition

2012-02-15 Thread Patrick Marlier
Hi, In PR/52220, eh-1.C fails because the dummy function __cxa_allocate_exception is used instead of the one from libstdc++. Indeed, the function is defined in libitm and thus is used. The fix consists to move the dummy function definitions to darwin-crt-tm.c. This fix was mainly contributed

Re: [libitm, darwin] PR52220 move dummy functions definition

2012-02-15 Thread Iain Sandoe
On 15 Feb 2012, at 23:39, Patrick Marlier wrote: PR libitm/52220 * alloc_cpp.cc: No dummy definitions for darwin. * eh_cpp.cc: Likewise. libgcc/ 2012-02-15 Iain Sandoe ia...@gcc.gnu.org Patrick Marlier patrick.marl...@gmail.com PR libitm/52220

Re: [v3] Disable gthreads on Solaris 8/9 (PR libstdc++/52189)

2012-02-15 Thread Jonathan Wakely
On 15 February 2012 17:44, Rainer Orth wrote: Ok for mainline? Yes, although I would prefer the config option to be --enable-libstdcxx-gthreads or --enable-libstdcxx-threads, since I prefer it to be clear that a config option relates just to libstdc++, and this only seems to affect libstdc++

Re: [libitm, darwin] PR52220 move dummy functions definition

2012-02-15 Thread Jack Howarth
On Wed, Feb 15, 2012 at 11:48:29PM +, Iain Sandoe wrote: On 15 Feb 2012, at 23:39, Patrick Marlier wrote: PR libitm/52220 * alloc_cpp.cc: No dummy definitions for darwin. * eh_cpp.cc: Likewise. libgcc/ 2012-02-15 Iain Sandoe ia...@gcc.gnu.org Patrick Marlier

[committed] Fix a typo (PR translation/52264)

2012-02-15 Thread Jakub Jelinek
Hi! Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious: 2012-02-16 Jakub Jelinek ja...@redhat.com PR translation/52264 * cgraphunit.c (verify_cgraph_node): Fix a typo. --- gcc/cgraphunit.c.jj 2012-02-12 15:46:32.0 +0100 +++

Go patch committed: Fix ice-on-valid for type with unknown size

2012-02-15 Thread Ian Lance Taylor
The gccgo frontend was crashing on code like type T1 struct { F1 *[1]T2 } type T2 struct { X int } It needed to know the size of T2 before it was computed. This patch fixes the problem. I added a testcase as bug417.go in the master Go testsuite, which I will merged into the gccgo testsuite

[PATCH] Fix up slpeel_tree_peel_loop_to_edge (PR tree-optimization/52255)

2012-02-15 Thread Jakub Jelinek
Hi! On this testcase we ICE, because slpeel_tree_peel_loop_to_edge is first called with a loop that has a virtual PHI and no virtual PHI in the loop exit bb and this function doesn't update the vop properly after inserting second loop and adding all the conditional guards, then

[PATCH] Don't decrease mem_cost for special MEMs, even with REG_EQUIV (PR rtl-optimization/52208)

2012-02-15 Thread Jakub Jelinek
Hi! As mentioned in the PR, if SET_SRC MEM (with REG_EQUIV note) isn't a MEM that can be used in general operations, but requires some specialized instruction to load it, decreasing its mem_cost results sometimes in worse code, the MEM is loaded with a specialized insn, then stored into a stack

[PATCH] Fix up copy_decls_walk (PR debug/52260)

2012-02-15 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because now that clone_tree_hash inserts elements into decl_table hash table, if the hash table is expanded during that, storing into *slot might either store it at a wrong spot, or in completely unrelated memory. Fixed by storing into the hash table

Go patch committed: Drop log2 and trunk

2012-02-15 Thread Ian Lance Taylor
Rainer Orth r...@cebitec.uni-bielefeld.de writes: The patch allowed the bootstrap to complete successfully, but since libgo.so now has undefined references to log2 and trunc, all Go execution still fail. I went ahead and removed the uses of the libc log2 and trunc functions, on the basis that