Re: GCC aliasing rules: more aggressive than C99?

2010-01-04 Thread Andrew Haley
On 01/03/2010 10:14 PM, Joshua Haberman wrote: > Andrew Haley redhat.com> writes: >> On 01/03/2010 10:53 AM, Richard Guenther wrote: >>> GCC follows its own documentation here, not some random >>> websites and maybe not the strict reading of the standard. >> >> GCC is compatible with C99 in this r

Re: GCC aliasing rules: more aggressive than C99?

2010-01-04 Thread Paolo Bonzini
On 01/03/2010 11:25 PM, Richard Guenther wrote: >char charray[sizeof(long)] = {...}; >long l = *(long*)charray; // ok not correct;) (the lvalue has to be of character type, yours is of type 'long' - the type of the actual object does not matter) What would be correct instead is

PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Mark Colby
This sounds like a dumb question I know. However the following code snippet results in many more machine instructions under 4.4.2 than under 2.9.5 (I am running a cygwin->PowerPC cross): typedef unsigned int U32; typedef union { U32 R; struct { U32 BF1:2; U32 :8;

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Andrew Haley
On 01/04/2010 10:51 AM, Mark Colby wrote: > This sounds like a dumb question I know. However the following code > snippet results in many more machine instructions under 4.4.2 than under > 2.9.5 (I am running a cygwin->PowerPC cross): > > typedef unsigned int U32; > typedef union > { > U

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Steven Bosscher
On Mon, Jan 4, 2010 at 12:02 PM, Andrew Haley wrote: > On 01/04/2010 10:51 AM, Mark Colby wrote: >> This sounds like a dumb question I know. However the following code >> snippet results in many more machine instructions under 4.4.2 than under >> 2.9.5 (I am running a cygwin->PowerPC cross): >> >>

RE: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Mark Colby
> >> Is there any way to improve this behaviour? I have been using 2.9.5 > very > >> successfully for years and am now looking at 4.4.2, but have many > such > >> examples in my code (for clarity of commenting and maintainability). > > > > This is very strange.  On x86_64, gcc 4.4.1 generates > > >

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Jakub Jelinek
On Mon, Jan 04, 2010 at 12:18:50PM +0100, Steven Bosscher wrote: > > This optimization is done by the first RTL cse pass.  I can't understand > > why it's not being done for your target.  I guess this will need a > > powerpc expert. > > Known bug, see http://gcc.gnu.org/PR22141 That's unrelated.

RE: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Mark Colby
> On Mon, Jan 04, 2010 at 12:18:50PM +0100, Steven Bosscher wrote: > > > This optimization is done by the first RTL cse pass.  I can't > understand > > > why it's not being done for your target.  I guess this will need a > > > powerpc expert. > > > > Known bug, see http://gcc.gnu.org/PR22141 > > T

where can find source snapshots of first GCC 4.5.0 ?

2010-01-04 Thread Bernd Roesch
Hi, Because of this regression, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41311 Problem is in m68k-elf too, but happen not with any older GCC as 4.5.0 i want try out if the first GCC 4.5.0 snapshot have this Problem or not. The first GCC 4.5.0 i compile was in month 08.this have the Bug. B

Re: where can find source snapshots of first GCC 4.5.0 ?

2010-01-04 Thread Jie Zhang
On Mon, Jan 4, 2010 at 8:04 PM, Bernd Roesch wrote: > Hi, > > Because of this regression, > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41311 > > Problem is in m68k-elf too, but happen not with any older GCC as 4.5.0 > > i want try out if the first GCC 4.5.0 snapshot > have this Problem or not.

RE: Possible IRA improvements for irregular register architectures

2010-01-04 Thread Ian Bolton
Happy New Year! I was hoping for some kind of response to this, but maybe I didn't give enough info? I'd appreciate some pointers on what I could do to prompt some discussion because I have some promising new ideas that lead on from what I've described below. Cheers, Ian > -Original Message

Call for participation: GROW'10 - 2nd Workshop on GCC Research Opportunities

2010-01-04 Thread Grigori Fursin
Apologies if you receive multiple copies of this call. CALL FOR PARTICIPATION 2nd Workshop on GCC Research Opportunities

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Andrew Haley
On 01/04/2010 12:07 PM, Jakub Jelinek wrote: > On Mon, Jan 04, 2010 at 12:18:50PM +0100, Steven Bosscher wrote: >>On Mon, Jan 4, 2010 at 12:02 PM, Andrew Haley wrote: >>> This optimization is done by the first RTL cse pass. I can't understand >>> why it's not being done for your target. I guess

RE: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Bingfeng Mei
I can confirm that our target also generate GOOD code for this case. Maybe this is a EABI or target-specific thing, where Struct/union is forced to memory. Bingfeng Broadcom Uk > -Original Message- > From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On > Behalf Of Andrew Haley

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Nathan Froyd
On Mon, Jan 04, 2010 at 04:08:17PM +, Andrew Haley wrote: > On 01/04/2010 12:07 PM, Jakub Jelinek wrote: > > IMHO we really should have some late tree pass that converts adjacent > > bitfield operations into integral operations on non-bitfields (likely with > > alias set of the whole containing

Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-04 Thread Andrew Haley
On 01/04/2010 04:17 PM, Nathan Froyd wrote: > On Mon, Jan 04, 2010 at 04:08:17PM +, Andrew Haley wrote: >> On 01/04/2010 12:07 PM, Jakub Jelinek wrote: >>> IMHO we really should have some late tree pass that converts adjacent >>> bitfield operations into integral operations on non-bitfields (li

entry point of gimplification

2010-01-04 Thread sandeep soni
Hi, I have been trying to understand the gcc source code and am interested in customizing gcc to support speculative parallelization of conditional branching and loop instructions instructions.I am considering gimple as input. I want to know what is the entry point to the gimplification pass? and

Re: GCC aliasing rules: more aggressive than C99?

2010-01-04 Thread Joshua Haberman
Andrew Haley redhat.com> writes: > On 01/03/2010 10:14 PM, Joshua Haberman wrote: > > Andrew Haley redhat.com> writes: > "6.3.2.3 > > "A pointer to an object or incomplete type may be converted to a > pointer to a different object or incomplete type. If the resulting > pointer is not correctly al

df_changeable_flags use in combine.c

2010-01-04 Thread Matt
Hi, I'm fixing some compiler errors when configuring with --enable-build-with-cxx, and ran into a curious line of code that may indicate a bug: static unsigned int rest_of_handle_combine (void) { int rebuild_jump_labels_after_combine; df_set_flags (DF_LR_RUN_DCE + DF_DEFER_INSN_RESCAN);

[gcc-as-cxx] enum conversion to int

2010-01-04 Thread Matt
Hi, I'm trying to fix some errors/warnings to make sure that gcc-as-cxx doesn't bitrot too much. I ran into this issue, and an unsure how to fix it without really ugly casting: enum df_changeable_flags df_set_flags (enum df_changeable_flags changeable_flags) { enum df_changeable_flags old_f

Re: GCC aliasing rules: more aggressive than C99?

2010-01-04 Thread Erik Trulsson
On Mon, Jan 04, 2010 at 08:17:00PM +, Joshua Haberman wrote: > Andrew Haley redhat.com> writes: > > On 01/03/2010 10:14 PM, Joshua Haberman wrote: > > > Andrew Haley redhat.com> writes: > > "6.3.2.3 > > > > "A pointer to an object or incomplete type may be converted to a > > pointer to a diff

Re: GCC aliasing rules: more aggressive than C99?

2010-01-04 Thread Joshua Haberman
Erik Trulsson student.uu.se> writes: > On Mon, Jan 04, 2010 at 08:17:00PM +, Joshua Haberman wrote: > > The text you quoted does not contain any "shall not" language about > > dereferencing, so this conclusion does not follow. > > It doesn't have to use any "shall not" language. If the standa

Re: df_changeable_flags use in combine.c

2010-01-04 Thread Jie Zhang
On 01/05/2010 07:12 AM, Matt wrote: Hi, I'm fixing some compiler errors when configuring with --enable-build-with-cxx, and ran into a curious line of code that may indicate a bug: static unsigned int rest_of_handle_combine (void) { int rebuild_jump_labels_after_combine; df_set_flags (DF_LR_RUN

dwarf2 - multiple DW_TAG_variable for global variable

2010-01-04 Thread Nenad Vukicevic
I installed gcc-4.5-20091224 snapshot and noticed that for simple variable declaration I get two DW_TAG_variable dies in the object file. For example, the following code int x; main() {x=1;} generates (with -g -gdwarf2 -O0 switches): <1><54>: Abbrev Number: 4 (DW_TAG_variable) <55>

Why Thumb-2 only allows very limited access to the PC?

2010-01-04 Thread Carrot Wei
Hi In function arm_load_pic_register in file arm.c there are following code: if (TARGET_ARM) { ... } else if (TARGET_THUMB2) { /* Thumb-2 only allows very limited access to the PC. Calculate the address in a temporary reg