Re: Problem with Fix for PR 35163 ?

2008-04-08 Thread Pranav Bhandarkar
> Btw, I have a fix. oh gr8. I just saw your post on the gcc-patches. Do you still want me to add this to PR35163 for the record ? Cheers! Pranav

Re: improving auto increment expressions detection across basic blocks.

2008-04-08 Thread Kenneth Zadeck
Kenneth Zadeck wrote: Mark Mitchell wrote: Kenneth Zadeck wrote: The majority of the new bugs were places where the rest of the compiler was just not expecting to see auto inc or dec instructions. If you want to take on doing this kind of extension, be prepared for the additional cost. Ken

Re: RFC: A new meta intrinsic header file for x86 intrinsics

2008-04-08 Thread Mark Mitchell
H.J. Lu wrote: Icc and gcc will use the same filename. The question is what filename to use. Oh, OK. If we get to pick, then, yes, I think is nice. -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713

Re: RFC: A new meta intrinsic header file for x86 intrinsics

2008-04-08 Thread H.J. Lu
On Tue, Apr 08, 2008 at 02:10:55PM -0700, Mark Mitchell wrote: > H.J. Lu wrote: > >> We will implement meta intrinsic header file for AVX intrinsics. >> However, I am not sure if is the best name for it. >> Does anyone have any suggestions, how about ? > > I think there's value in using the same n

more m32c brokenness

2008-04-08 Thread DJ Delorie
Continuation of the last one, different bug, building libstdc++ ... Look familiar to anyone? If not, I'll try to hunt down the cause. The culprit is this line: D.25530 = (unsigned int) D.25529; For m32cm, "int" is 16 bits, "long" is 32 bits, and "void*" is 24 bits. A cast to unsigned int t

Re: GCC 4.3.0 compilation error

2008-04-08 Thread Joe Buck
On Tue, Apr 08, 2008 at 04:46:16PM -0700, Mark Mitchell wrote: > Jim Wilson wrote: > >Wirawan Purwanto wrote: > >>I tried to compile GCC 4.3.0 on a Red Hat Linux 9.0 box, it stopped at > >>stage 1: > > > >Compiling new gcc versions on old linux versions may not always work, > >and is unlikely to

Re: Problem with reloading in a new backend...

2008-04-08 Thread Andy H
Take at look at AVR target which is very similar. Here onluy "d" constrained register accept constants (they are call used registers too) The AVR move pattern (*reloadinqi) has multiple constrain options "d" against "i" being relevant. So check you have all the combinations defined. You omit

Re: GCC 4.3.0 compilation error

2008-04-08 Thread Mark Mitchell
Jim Wilson wrote: Wirawan Purwanto wrote: I tried to compile GCC 4.3.0 on a Red Hat Linux 9.0 box, it stopped at stage 1: Compiling new gcc versions on old linux versions may not always work, and is unlikely to be fixed. You are probably on your own here if you run into a non-trivial proble

Re: RFC: A new meta intrinsic header file for x86 intrinsics

2008-04-08 Thread Mark Mitchell
H.J. Lu wrote: We will implement meta intrinsic header file for AVX intrinsics. However, I am not sure if is the best name for it. Does anyone have any suggestions, how about ? I think there's value in using the same name as icc. It's set a precedent, let's keep it. That makes it easy for

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Robert C. Seacord
Dave, I made at least one change you suggested: #include void f(char *buf) { unsigned int len = 0xFF00u; if (buf+len < buf) puts("true"); } int main(void) { char buffer[100]; printf("buffer addr = %p.\n", buffer); f(buffer); return 0; } And compiled with flags: /O2 /GL

Re: Problem with Fix for PR 35163 ?

2008-04-08 Thread Richard Guenther
On Tue, Apr 8, 2008 at 5:36 PM, Richard Guenther <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 8, 2008 at 4:46 PM, Pranav Bhandarkar > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Consider the attached testcase. > > > > Working on a private port (Infact I see this problem on > > arm-none-eabi-

Problem with reloading in a new backend...

2008-04-08 Thread Stelian Pop
Hi, I'm working on a GCC (4.3.0) backend for a custom 16 bit microcontroller we're designing at work, and I'm facing a reload problem. After having lost many hours trying to make it work, I decided to ask for some help :) I'll try to summarize the situation below, but by all means please ask for

Re: improving auto increment expressions detection across basic blocks.

2008-04-08 Thread Kenneth Zadeck
Mark Mitchell wrote: Kenneth Zadeck wrote: The majority of the new bugs were places where the rest of the compiler was just not expecting to see auto inc or dec instructions. If you want to take on doing this kind of extension, be prepared for the additional cost. Kenny, do you have any poi

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Florian Weimer
* Robert C. Seacord: > I agree with you that the behavior that gcc exhibits in this case is > permitted by the ISO/IEC 9899:1999 C specification > > (ยง6.5.6p8). I believe the vulnerability is that gcc may *silently* > discard the overfl

Re: Copyright assignment wiki page

2008-04-08 Thread Florian Weimer
* Richard Kenner: >> This is probably true for a country like the USA, but like FX >> the FSF didn't ask a disclaimer from my employer: in France >> as long as you don't use your employer ressources to contribute >> your employer has absolutely no say on what you do outside your work. > > That's t

Re: improving auto increment expressions detection across basic blocks.

2008-04-08 Thread Mark Mitchell
Kenneth Zadeck wrote: The majority of the new bugs were places where the rest of the compiler was just not expecting to see auto inc or dec instructions. If you want to take on doing this kind of extension, be prepared for the additional cost. Kenny, do you have any pointers to autoincrement

RE: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Dave Korn
Robert C. Seacord wrote on : > Specifically with regards to MSVC 2005, I thought Chad had already > checked this and found that it did not exhibit this behavior. I just > tested the following program. > > #include > > void f(char *buf) { > unsigned int len = len = 0xFF00; I'm sure y

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Mark Mitchell
Robert C. Seacord wrote: I will update the CERT C Secure Coding rule with a list of compilers, once we complete a fact check. Chad is responsible for updating the vul note, so I'll need to discuss this with him. Thanks. Specifically with regards to MSVC 2005, I thought Chad had already che

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Robert C. Seacord
Mark, I will update the CERT C Secure Coding rule with a list of compilers, once we complete a fact check. Chad is responsible for updating the vul note, so I'll need to discuss this with him. Specifically with regards to MSVC 2005, I thought Chad had already checked this and found that it

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Mark Mitchell
Mark Mitchell wrote: Mark Mitchell wrote: I've been told that Intel's ICC compiler also does this optimization: Apparently, IAR's Atmel AVR compiler does this optimization as well. That CPU has 16-bit addresses, so the tester changed the test case to use "1 << 14" instead of "1 << 30". I'

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Mark Mitchell
Daniel Jacobowitz wrote: On Tue, Apr 08, 2008 at 01:09:18PM +0100, Dave Korn wrote: ~ $ gcc -O3 -S -xc -o 2.s - extern void foo (char *buf, int len); extern void bar (char *buf); void foo (char *buf, int len) { if (buf+len < buf) { bar (buf); } return; } Note that if buf is a char

KwGdOwMp 4329040559400834703

2008-04-08 Thread frederigo hee
dck 4008 nRLSKwG 653394 EZGO 559 QjgknRLSKwGdOwMp 4329040 krAQjgknRL 912265339432904055 AQjgknRLSKwGd 5339432904055940

Re: Doubt about filling delay slot

2008-04-08 Thread Jim Wilson
Mohamed Shafi wrote: 'liu' will load the immediate value into the upper byte of the specified register. The lower byte of the register is unaffected. The liu pattern should be something like (set (regX) (ior:HI (and:HI (regX) (const_int 255)) (const_int Y))) Jim

Re: Problem with Fix for PR 35163 ?

2008-04-08 Thread Richard Guenther
On Tue, Apr 8, 2008 at 4:46 PM, Pranav Bhandarkar <[EMAIL PROTECTED]> wrote: > Hi, > > Consider the attached testcase. > > Working on a private port (Infact I see this problem on > arm-none-eabi-gcc too). I see the following in test.c.003t.original > > fail = (short int) usi <= ssi; > > And th

Re: gcc4.x handling of switch(enum)

2008-04-08 Thread Richard Guenther
On Tue, Apr 8, 2008 at 2:32 PM, Pjotr Kourzanov <[EMAIL PROTECTED]> wrote: > Dear gcc developers, > > I have found a weird discrepancy in error/warning reporting in > GCC4.x. The following fragment: > > enum e { A, B, C }; > struct u { enum e e:2; }; > void bar(struct u u) { >switch (

Re: improving auto increment expressions detection across basic blocks.

2008-04-08 Thread Kenneth Zadeck
The auto-increment code was a quick hack based on the code that existed in flow.c. I moved it to a new pass and generalized it quite a bit, but it is at its core, basicly the same local code. The right way to implement this is as a global, or at least loop by loop problem where du or ud chains gu

Re: Doubt about filling delay slot

2008-04-08 Thread Ian Lance Taylor
"Mohamed Shafi" <[EMAIL PROTECTED]> writes: > Like you said i tried to split the move_immediate pattern after > reload. This is how i did this : > > (define_split > [(set (match_operand:HI 0 "register_operand" "") > (match_operand:HI 1 "immediate_operand" ""))] > "reload_completed" >

Problem with Fix for PR 35163 ?

2008-04-08 Thread Pranav Bhandarkar
Hi, Consider the attached testcase. Working on a private port (Infact I see this problem on arm-none-eabi-gcc too). I see the following in test.c.003t.original fail = (short int) usi <= ssi; And then in test.c.025t.ssa usi.2_5 = (short int) usi_4; fail.3_6 = usi.2_5 <= ssi_2; Now ccp1 does c

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Marc Lehmann
On Mon, Apr 07, 2008 at 02:15:14PM -0400, "Robert C. Seacord" <[EMAIL PROTECTED]> wrote: > >The advisory suggests that people not use GCC. > no, it does not. it suggests they may not want to use the latest > versions. this is one possible work around. we never say "use another > compiler".

Re: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Daniel Jacobowitz
On Tue, Apr 08, 2008 at 01:09:18PM +0100, Dave Korn wrote: > ~ $ gcc -O3 -S -xc -o 2.s - > extern void foo (char *buf, int len); > extern void bar (char *buf); > > void foo (char *buf, int len) > { > if (buf+len < buf) > { > bar (buf); > } > return; > } Note that if buf is a char *, t

gcc4.x handling of switch(enum)

2008-04-08 Thread Pjotr Kourzanov
Dear gcc developers, I have found a weird discrepancy in error/warning reporting in GCC4.x. The following fragment: enum e { A, B, C }; struct u { enum e e:2; }; void bar(struct u u) { switch (u.e) { case A:; } } It does (rightfully) trigger a -Wswitch warning on gcc-3.3

RE: US-CERT Vulnerability Note VU#162289

2008-04-08 Thread Dave Korn
Mark Mitchell wrote on : > Mark Mitchell wrote: > >> I've been told that Intel's ICC compiler also does this optimization: > > Apparently, IAR's Atmel AVR compiler does this optimization as well. Say, how do I get gcc to actually do this? I can't reproduce this in a real-world test. I woul

Re: Doubt about filling delay slot

2008-04-08 Thread Mohamed Shafi
On Thu, Apr 3, 2008 at 8:28 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > > "Mohamed Shafi" <[EMAIL PROTECTED]> writes: > > > On Thu, Apr 3, 2008 at 7:35 PM, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > >> "Mohamed Shafi" <[EMAIL PROTECTED]> writes: > >> > >> > >> > Say the target has two

Re: m32c build fails

2008-04-08 Thread Richard Guenther
On Mon, 7 Apr 2008, DJ Delorie wrote: > > > I will apply the following if you confirm this fixes m32c-elf. > > It fixed that particular bug, but another one elsewhere stopped the > build and I don't know what caused the other one. > > m32c-elf is easily cross-build with newlib and binutils if y

Re: Copyright assignment wiki page

2008-04-08 Thread Paolo Bonzini
Then I suggest changing our contribute page from contact us (either via the gcc@gcc.gnu.org list or the GCC maintainer that is taking care of your contributions) to obtain the relevant forms to contact us (either via the gcc@gcc.gnu.org list or a GCC Steering Commitee member) to obtain the

Re: Copyright assignment wiki page

2008-04-08 Thread FX Coudert
Moreover, our contribute page says "the GCC maintainer that is taking care of your contributions" and there is no documentation to maintainers, so that part at least is wrong: maintainers don't know what to do. Or else, I just didn't receive the maintainer welcome package including the appr