Re: A query regarding the implementation of pragmas

2008-04-14 Thread Andrew Haley
Mohamed Shafi wrote: > For a function call will i be able to implement long call/short call > for the same function at different locations? > Say fun1 calls bar and fun2 calls bar. I want short-call to be > generated for bar in fun1 and long-call to be generated in fun2. > Is to possible to implem

Moving statements from one BB to other BB.

2008-04-14 Thread Sandeep Maram
Hi, I have transferred all the statements of one BB( header of one loop) to another BB. After that I have updated SSA information too. But I get this error- definition in block 6 does not dominate use in block 3 for SSA_NAME: i_25 in statement: # VUSE D.1189_10 = a[i_25]; loop.c:8: internal com

Problem compiling apache 2.0.63, libiconv.so: wrong ELF class: ELFCLASS32

2008-04-14 Thread Persson Håkan
Hello I'm having problem when making apache 2.0.63. Im using the configure command like this: CC="gcc" CFLAGS=" -O2 -mcpu=v9 -m64" CPPFLAGS=" -m64 -I/usr/sfw/include" LDFLAGS="-m64" \ ./configure --prefix=/usr/apache2 --enable-mods-shared=most --with-mpm=prefork And the problem I got looks li

A query regarding the implementation of pragmas

2008-04-14 Thread Mohamed Shafi
Hello all, For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this in the back

Re: Moving statements from one BB to other BB.

2008-04-14 Thread Richard Guenther
On Mon, Apr 14, 2008 at 12:54 PM, Sandeep Maram <[EMAIL PROTECTED]> wrote: > Hi, > > I have transferred all the statements of one BB( header of one loop) > to another BB. After that I have updated SSA information too. > But I get this error- > > definition in block 6 does not dominate use in b

Re: omp workshare (PR35423) & beginner questions

2008-04-14 Thread Jakub Jelinek
Hi! On Wed, Apr 09, 2008 at 11:29:24PM -0500, Vasilis Liaskovitis wrote: > I am a beginner interested in learning gcc internals and contributing > to the community. Thanks for showing interest in this area! > I have started implementing PR35423 - omp workshare in the fortran > front-end. I have

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Paul Schlie
>> (as an aside, as most target implementations treat pointers as unsigned >> values, its not clear that presuming signed integer overflow semantics are >> a reasonable choice for pointer comparison optimization) > > The point is not of presuming signed integer overflow semantics (I was > correcte

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Richard Guenther
On Mon, Apr 14, 2008 at 1:55 PM, Paul Schlie <[EMAIL PROTECTED]> wrote: > > > >> (as an aside, as most target implementations treat pointers as unsigned > >> values, its not clear that presuming signed integer overflow semantics are > >> a reasonable choice for pointer comparison optimization) >

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Paul Schlie wrote: (as an aside, as most target implementations treat pointers as unsigned values, its not clear that presuming signed integer overflow semantics are a reasonable choice for pointer comparison optimization) The point is not of presuming signed integer overflow semantics (I was co

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Richard Guenther wrote: In absence of any declared object (like with this testcase where we just have an incoming pointer to some unknown object) the compiler can still assume that any valid object ends at the end of the address space. Thus, an object either declared or allocated via malloc neve

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Andreas Schwab
Robert Dewar <[EMAIL PROTECTED]> writes: > Alex Stepanov told me once that he preferred Ada to C, because Ada > has proper pointer arithmetic (via the type Integer_Address) which > is defined to work in Ada in the manner that Paul mistakenly expects > for C. Integer_Address would be a bit of a pai

[PATCH][RFC] middle-end array expressions (II)

2008-04-14 Thread Richard Guenther
This is the final proposal for the introduction of arrays as first class citizens of the middle-end. The goal is still to retain the high-level information that the GFortran frontend has for array assignments up to the high-level loop optimization passses and to not lower Fortran array assignmen

Re: Request copyright assignment form

2008-04-14 Thread Gerald Pfeifer
Hi Bob, On Sat, 12 Apr 2008, Bob Walters wrote: > Can you send me any reference to the current copyright assignment > form, so that I can get this taken care of. I found something online > at http://gcc.gnu.org/ml/gcc/2002-09/msg00678.html, but have no idea > if that is current, so wanted to chec

Re: Where is scheduling going wrong? - GCC-4.1.2

2008-04-14 Thread Jim Wilson
On Sun, 2008-04-13 at 17:05 +0530, Mohamed Shafi wrote: > Well i tracked down the cause to the md file. In the md file i had a > define_expand for the jump pattern. Inside the pattern i was checking > whether the value of the offset for the jump is out of range and if > its out of range then force

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Joe Buck
Robert C. Seacord wrote: > > i agree that the optimization is allowed by C99. i think this is a > > quality of implementation issue, and that it would be preferable for > > gcc to emphasize security over performance, as might be expected. On Sun, Apr 13, 2008 at 11:51:00PM +0200, Florian Weimer

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Florian Weimer
* Robert Dewar: > Florian Weimer wrote: >> * Robert C. Seacord: >> >>> i agree that the optimization is allowed by C99. i think this is a >>> quality of implementation issue, and that it would be preferable for >>> gcc to emphasize security over performance, as might be expected. >> >> I don't t

Re: A Query regarding jump pattern

2008-04-14 Thread Ian Lance Taylor
"Mohamed Shafi" <[EMAIL PROTECTED]> writes: > I have read in the internals that indirect_jump and jump pattern are > necessary in any back-end for the compiler to be build and work > successfully. For any back-end there will be some limitation as to how > big the offset used in the jump instructio

Re: Problem compiling apache 2.0.63, libiconv.so: wrong ELF class: ELFCLASS32

2008-04-14 Thread Ian Lance Taylor
Persson Håkan <[EMAIL PROTECTED]> writes: > I'm having problem when making apache 2.0.63. Wrong mailing list. gcc@gcc.gnu.org is about developing gcc. [EMAIL PROTECTED] is about using gcc. I don't know the answer to your question. It looks specific to your distribution. Ian

Re: A query regarding the implementation of pragmas

2008-04-14 Thread Jim Wilson
Mohamed Shafi wrote: For a function call will i be able to implement long call/short call for the same function at different locations? Say fun1 calls bar and fun2 calls bar. I want short-call to be generated for bar in fun1 and long-call to be generated in fun2. Is to possible to implement this

Re: Mapping back to original variables after SSA optimizations

2008-04-14 Thread Diego Novillo
On 4/10/08 8:16 AM, Fran Baena wrote: Hi all, i have a doubt about unSSA: is it allways possible to map back the versioned variables to the original variable? If it could be possible, is there an algorithm that describe this translation back? It is not always possible. If there are overlappin

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Ian Lance Taylor
Florian Weimer <[EMAIL PROTECTED]> writes: >> To me, dubious optimizations like this at the very least should >> be optional and able to be turned off. > > Why is this optimization dubious? We would need to look at real-world > code to tell, and so far, we haven't heard anything about the context

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Ian Lance Taylor wrote: A theoretical argument for why somebody might write problematic code is http://www.fefe.de/openldap-mail.txt . I don't know where, or even if, such code is actually found in the wild. Ian Fair enough question. The other question of course is how much this optimization

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Joe Buck
On Mon, Apr 14, 2008 at 04:27:40PM -0400, Robert Dewar wrote: > Ian Lance Taylor wrote: > > >A theoretical argument for why somebody might write problematic code > >is http://www.fefe.de/openldap-mail.txt . > > > >I don't know where, or even if, such code is actually found in the > >wild. > > > >I

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Florian Weimer wrote: Existing safe C implementations take a performance hit which is a factor between 5 and 11 in terms of execution time. There is some new research that seems to get away with a factor less than 2, but it's pretty recent and I'm not sure if it's been reproduced independently.

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Joe Buck wrote: On Mon, Apr 14, 2008 at 04:27:40PM -0400, Robert Dewar wrote: Ian Lance Taylor wrote: A theoretical argument for why somebody might write problematic code is http://www.fefe.de/openldap-mail.txt . I don't know where, or even if, such code is actually found in the wild. Ian F

RE: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Gerald.Williams
Robert Dewar wrote: > An optimziation is dubious to me if > > a) it produces surprising changes in behavior (note the importance of > the word surprising here) > > b) it does not provide significant performance gains (note the > importance of the word significant here). > > I find this optimizat

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

2008-04-14 Thread Stelian Pop
Le vendredi 11 avril 2008 à 11:14 -0700, Jim Wilson a écrit : > Stelian Pop wrote: > > #define PREFERRED_RELOAD_CLASS(X, CLASS)\ > > ((CONSTANT_P(X)) ? EIGHT_REGS : \ > >(MEM_P(X)) ? EVEN_REGS : CLASS) > > > > #define PREFERRED_OUTPUT_RELOAD_CLASS(X, CL

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
[EMAIL PROTECTED] wrote: It's already been acknowledged that the source code is wrong to assume that the compiler knows about wrapping of pointers. The real issue at this stage is how to warn users who may be using GCC and implicitly relying on its old behavior, without unintentionally pushing p

gcc-4.1-20080414 is now available

2008-04-14 Thread gccadmin
Snapshot gcc-4.1-20080414 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20080414/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.1 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Joe Buck
On Mon, Apr 14, 2008 at 06:42:30PM -0400, Robert Dewar wrote: > >[In fact, > >after GCC does something to warn users about this, it'll be > >much "safer" than those other compilers.] > > For sure you want a warning, the compiler should never be > removing explicit tests in the users code without g

INSTALL/configure.html mentions ${gcc_tooldir} - what's that?

2008-04-14 Thread Denys Vlasenko
Hi, INSTALL/configure.html mentions ${gcc_tooldir}, just once. Here: Cross-Compiler-Specific Options The following options only apply to building cross compilers. --with-sysroot --with-sysroot=dir Tells GCC to consider dir as the root of a tree that contains a (subset of) the root files

MAX_CONSTRAINT VALUE

2008-04-14 Thread Balaji V. Iyer
Hello Everyone, I am currently working on OpenRISC port of GCC and I am trying to add more constraints to the machine-dependent part and the default number of constrant seem to be only 30 (and obviously I have more than 30 constraints, and thus it was failing). I tried making this a #define val

Re: RFC: named address space support

2008-04-14 Thread Ben Elliston
Hi Mark > I'm not terribly familiar with this proposal. > Ben, to answer your original question, I don't think that lack of nested > address spaces is a fatal flaw, as long as the implementation otherwise > meets the spec, and as long as the implementation doesn't somehow make > it harder to a

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Paul Schlie
> Robert Dewar <[EMAIL PROTECTED]> > >> Richard Guenther wrote: >> >> In absence of any declared object (like with this testcase where we just >> have an incoming pointer to some unknown object) the compiler can >> still assume that any valid object ends at the end of the address space. >> Thus,

Re: MAX_CONSTRAINT VALUE

2008-04-14 Thread Ben Elliston
Hi there Balaji, >Here is the patch for it (if a value is not provided, then the > default value of 30 is assumed). I tried to build this for x86 and arm > and they seem to work fine with no problems. Thanks for the patch. You should send your patch to gcc-patches, though, not the main GCC l

Re: INSTALL/configure.html mentions ${gcc_tooldir} - what's that?

2008-04-14 Thread Jim Wilson
Denys Vlasenko wrote: Please, can somebody add an explanation to INSTALL/configure.html what ${gcc_tooldir} is, and how to set it (I guess with configure option or something?) gcc_tooldir is a makefile variable. You can't change it directly. It is effectively $prefix/$target, though if you l

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

2008-04-14 Thread Jim Wilson
On Tue, 2008-04-15 at 00:06 +0200, Stelian Pop wrote: > - I had to add a PLUS case in PREFERRED_RELOAD_CLASS() or else reload > kept generating incorrect insn (putting constants into EVEN_REGS for > example). I'm not sure this is correct or if it hides something else... It does sound odd, b

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Robert Dewar
Joe Buck wrote: On Mon, Apr 14, 2008 at 06:42:30PM -0400, Robert Dewar wrote: [In fact, after GCC does something to warn users about this, it'll be much "safer" than those other compilers.] For sure you want a warning, the compiler should never be removing explicit tests in the users code witho

IA-64 ICE on integer divide due to trap_if and cfgrtl

2008-04-14 Thread Jim Wilson
This testcase extracted from libgcc2.c int sub (int i) { if (i == 0) return 1 / i; return i + 2; } compiled with -minline-int-divide-min-latency for IA-64 generates an ICE. tmp2.c:8: error: flow control insn inside a basic block (insn 18 17 19 3 tmp2.c:5 (trap_if (const_int 1 [0x1])

[ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sqrtsf2 / sqrtdf2) functions

2008-04-14 Thread Hasjim Williams
Hello all, I've been working on MaverickCrunch support in gcc, and could never get a completely working glibc (with-fp), since there is no soft-float sqrt libcall function. This is a big problem for MaverickCrunch as there are no hard div or sqrt opcodes. It seems that this is the only other thi

Re: [ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sqrtsf2 / sqrtdf2) functions

2008-04-14 Thread Daniel Jacobowitz
On Tue, Apr 15, 2008 at 12:33:38PM +1000, Hasjim Williams wrote: > Hello all, > > I've been working on MaverickCrunch support in gcc, and could never get > a completely working glibc (with-fp), since there is no soft-float sqrt > libcall function. This is a big problem for MaverickCrunch as there

Re: Official GCC git repository

2008-04-14 Thread Kirill A. Shutemov
On Wed, Mar 26, 2008 at 02:38:53PM -0400, Daniel Berlin wrote: > On Wed, Mar 26, 2008 at 12:30 PM, Frank Ch. Eigler <[EMAIL PROTECTED]> wrote: > > Hi - > > > > On Fri, Mar 14, 2008 at 10:41:42AM -0400, Frank Ch. Eigler wrote: > > > > > [...] > > > > > OK, /git/gcc.git appears ready for you to pop

Re: [ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sqrtsf2 / sqrtdf2) functions

2008-04-14 Thread Hasjim Williams
On Mon, 14 Apr 2008 22:41:36 -0400, "Daniel Jacobowitz" <[EMAIL PROTECTED]> said: > On Tue, Apr 15, 2008 at 12:33:38PM +1000, Hasjim Williams wrote: > > Hello all, > > > > I've been working on MaverickCrunch support in gcc, and could never get > > a completely working glibc (with-fp), since there

Re: [ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sqrtsf2 / sqrtdf2) functions

2008-04-14 Thread Daniel Jacobowitz
On Tue, Apr 15, 2008 at 12:58:40PM +1000, Hasjim Williams wrote: > Both FPA and VFP coprocessors implement sqrt opcodes: So? Glibc does not rely on that. I've been building soft-float versions of glibc for non-Crunch targets for scarily close to a decade now, so this is clearly not the problem :

Re: [ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sqrtsf2 / sqrtdf2) functions

2008-04-14 Thread Hasjim Williams
On Mon, 14 Apr 2008 23:09:00 -0400, "Daniel Jacobowitz" <[EMAIL PROTECTED]> said: > On Tue, Apr 15, 2008 at 12:58:40PM +1000, Hasjim Williams wrote: > > Both FPA and VFP coprocessors implement sqrt opcodes: > > So? Glibc does not rely on that. I've been building soft-float > versions of glibc f

Can't build correctly working crosscompiler with 4.3.0. 4.2.1 worked like charm

2008-04-14 Thread Denys Vlasenko
Ok, I give up. I killed many hours trying to build a cross-compiling x86_64-linux-uclibc-gcc, version 4.3.0. After many "WTF?" moments I decided to go back and try to build a cross-compiler which I already have, just older version: I decided to build i486 one, not x86_64. Because I already have

Re: US-CERT Vulnerability Note VU#162289

2008-04-14 Thread Ian Lance Taylor
Robert Dewar <[EMAIL PROTECTED]> writes: > An optimziation is dubious to me if > > a) it produces surprising changes in behavior (note the importance of > the word surprising here) > > b) it does not provide significant performance gains (note the > importance of the word significant here). > > I

Re: IA-64 ICE on integer divide due to trap_if and cfgrtl

2008-04-14 Thread Ian Lance Taylor
Jim Wilson <[EMAIL PROTECTED]> writes: > It seems odd that cfgrtl allows a conditional trap inside a basic block, > but not an unconditional trap. The way things are now, it means we need > to fix up the basic blocks after running combine or any other pass that > might be able to simplify a condi

Re: Moving statements from one BB to other BB.

2008-04-14 Thread Daniel Berlin
To clarify what Richard means, your assertion that "you have updated SSA information" is false. If you had updated the SSA information, the error would not occur :). How exactly are you updating the ssa information? The general way to update SSA for this case would be: For each statement you hav

Re: Official GCC git repository

2008-04-14 Thread Daniel Berlin
I put my version of the gcc conversion (which has all branches but no tags) at git://gcc.gnu.org/git/gcc.git and set a script up to update it appropriately. Note that i will not announce this anywhere until someone steps forward to actually maintain it because i do not know GIT. Neither of the pe

Re: Moving statements from one BB to other BB.

2008-04-14 Thread Sandeep Maram
On Tue, Apr 15, 2008 at 10:34 AM, Daniel Berlin <[EMAIL PROTECTED]> wrote: > To clarify what Richard means, your assertion that "you have updated > SSA information" is false. > If you had updated the SSA information, the error would not occur :). > > How exactly are you updating the ssa informat

Re: A query regarding the implementation of pragmas

2008-04-14 Thread Mohamed Shafi
On Mon, Apr 14, 2008 at 11:44 PM, Jim Wilson <[EMAIL PROTECTED]> wrote: > > Mohamed Shafi wrote: > > > For a function call will i be able to implement long call/short call > > for the same function at different locations? > > Say fun1 calls bar and fun2 calls bar. I want short-call to be > > genera

Re: Official GCC git repository

2008-04-14 Thread Bernie Innocenti
Daniel Berlin wrote: I put my version of the gcc conversion (which has all branches but no tags) at git://gcc.gnu.org/git/gcc.git and set a script up to update it appropriately. Note that i will not announce this anywhere until someone steps forward to actually maintain it because i do not know