Re: identifying c++ aliasing violations

2005-12-05 Thread Giovanni Bajo
Jack Howarth <[EMAIL PROTECTED]> wrote: > What exactly is the implication of having a hundred or more of this in > an application being built with gcc/g++ 4.x at -O3? Does it only risk > random crashes in the generated code or does it also impact the > quality > of the generated code in terms of e

Re: gcc-4.0-20051124-4.0-20051201.diff.bz2 is TERRIBLE!!!

2005-12-05 Thread Paolo Bonzini
J.C. wrote: *** gcc-4.0-20051124/gcc/config/i386/i386.c Mon Nov 7 18:55:03 2005 --- gcc-4.0-20051201/gcc/config/i386/i386.c Thu Dec 1 01:53:01 2005 ! #if defined(HAVE_GAS_HIDDEN) && defined(SUPPORTS_ONE_ONLY) ! #if defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0) Why did he remove

Re: identifying c++ aliasing violations

2005-12-05 Thread Jack Howarth
Giovanni, I'll see what I can do in terms of profiling the xplor-nih code with Shark on MacOS X. However in the near term, I would strongly urge the gcc developers to backport the changes necessary to have -Wstrict-aliasing issue warnings for c++ in gcc 4.1. I rebuilt xplor-nih under gcc trunk

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread schopper-gcc
Shouldn't the compiler behave in the following way, concerning the signedness of pointer arguments? void f (long *l, signed long *sl, unsigned long *ul); // - Make NO assumptions about the signedness of *l and accept long, //slong and ulong without a warning // - treat *sl as signed l

Re: GMP on IA64-HPUX

2005-12-05 Thread Steve Ellcey
> > > So, in short, my questions are: is gmp-4.1.4 supposed to work on > > > ia64-hpux? > > > > > > No, it is not. It might be possible to get either the LP64 or > > > the ILP32 ABI to work, but even that requires the workaround you > > > mention. Don't expect any HP compiler to compile GMP c

Re: GMP on IA64-HPUX

2005-12-05 Thread Steve Kargl
On Mon, Dec 05, 2005 at 07:57:43AM -0800, Steve Ellcey wrote: > > > > So, in short, my questions are: is gmp-4.1.4 supposed to work on > > > > ia64-hpux? > > > > > > > > No, it is not. It might be possible to get either the LP64 or > > > > the ILP32 ABI to work, but even that requires the work

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread Joe Buck
On Mon, Dec 05, 2005 at 03:27:56PM +0100, [EMAIL PROTECTED] wrote: > Shouldn't the compiler behave in the following way, concerning the signedness > of pointer arguments? > > void f (long *l, signed long *sl, unsigned long *ul); "long" and "signed long" are the same type. You are confused abou

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread schopper-gcc
Oh right, what I really meant was 'char' instead of 'long'. In fact I just took the type from the referenced article. Sorry for that. So am I right that the compiler should distinguish between char, signed char and unsigned char in the proposed way? > > "long" and "signed long" are the same typ

more strict-aliasing questions

2005-12-05 Thread Jack Howarth
Is there some place where all the existing forms of strict-aliasing warnings are documented? So far I have only seen the error... dereferencing type-punned pointer will break strict-aliasing rules when building c++ code with gcc trunk (4.2). I am wondering how many other types of warnings ca

Re: more strict-aliasing questions

2005-12-05 Thread Andrew Haley
Jack Howarth writes: > My second question is how univeral are the strict-aliasing > rules used by gcc? They are applicable to every compiler that implements ISO C++. In other words, code that violates aliasing constrains is not legal C++. > In other words, is it safe to say that by corr

Re: identifying c++ aliasing violations

2005-12-05 Thread Dale Johannesen
On Dec 5, 2005, at 12:03 AM, Giovanni Bajo wrote: Jack Howarth <[EMAIL PROTECTED]> wrote: What exactly is the implication of having a hundred or more of this in an application being built with gcc/g++ 4.x at -O3? Does it only risk random crashes in the generated code or does it also impact the q

Re: LTO, LLVM, etc.

2005-12-05 Thread Ian Lance Taylor
Mark Mitchell <[EMAIL PROTECTED]> writes: > There is one advantage I see in the LTO design over LLVM's design. In > particular, the LTO proposal envisions a file format that is roughly at > the level of GIMPLE. Such a file format could easily be extended to be > at the source-level version of Tr

Re: new gcc/g++ 4.1.0 flags?

2005-12-05 Thread Ian Lance Taylor
[EMAIL PROTECTED] (Jack Howarth) writes: > Where exactly are the compiler flags new to gcc 4.1.0 described. http://gcc.gnu.org/gcc-4.1/changes.html Ian

Re: LTO, LLVM, etc.

2005-12-05 Thread Steven Bosscher
On Saturday 03 December 2005 20:43, Mark Mitchell wrote: > There is one advantage I see in the LTO design over LLVM's design. In > particular, the LTO proposal envisions a file format that is roughly at > the level of GIMPLE. Such a file format could easily be extended to be > at the source-level

Re: LTO, LLVM, etc.

2005-12-05 Thread Gabriel Dos Reis
Steven Bosscher <[EMAIL PROTECTED]> writes: | On Saturday 03 December 2005 20:43, Mark Mitchell wrote: | > There is one advantage I see in the LTO design over LLVM's design. In | > particular, the LTO proposal envisions a file format that is roughly at | > the level of GIMPLE. Such a file format

Accessing const object during constructor without this pointer

2005-12-05 Thread Pankaj Gupta
Hi I have a question. Consider this code: #include void global_init(); class A { public: int i; A() : i(10) { global_init(); } }; const A obj; void global_init() { std::cout << "obj.i = " << obj.i << std::endl; } int main() { return EXIT_SUCCESS; } Here, global_init() is a

Re: LTO, LLVM, etc.

2005-12-05 Thread Chris Lattner
On Dec 5, 2005, at 11:48 AM, Steven Bosscher wrote: On Saturday 03 December 2005 20:43, Mark Mitchell wrote: There is one advantage I see in the LTO design over LLVM's design. In particular, the LTO proposal envisions a file format that is roughly at the level of GIMPLE. Such a file format

Re: c++ speed 3.3/4.0/4.1

2005-12-05 Thread Mike Stump
On Dec 4, 2005, at 3:09 PM, Jack Howarth wrote: I have noticed that there was a significant speed regression in the c++ code generation between gcc 3.3 and gcc 4.0.x. Gotta wonder if changing the inlining parameters would help you.

Problem with bugzilla account

2005-12-05 Thread Eric Weddington
Hello all, Sorry if this is off-topic; there's not a mailing list described for this kind of issue. I have a problem with making an email change for my bugzilla account. The old email address no longer exists, so bugzilla won't allow me to update my account to the new email address (because

Re: c++ speed 3.3/4.0/4.1

2005-12-05 Thread Jack Howarth
Mike, Do you mean using -fno-threadsafe-statics or do you have any other inlining changes in mind? Jack

Re: GMP on IA64-HPUX

2005-12-05 Thread John David Anglin
> On Mon, Dec 05, 2005 at 07:57:43AM -0800, Steve Ellcey wrote: > > > > > So, in short, my questions are: is gmp-4.1.4 supposed to work on > > > > > ia64-hpux? > > > > > > > > > > No, it is not. It might be possible to get either the LP64 or > > > > > the ILP32 ABI to work, but even that requi

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread Mike Stump
On Dec 5, 2005, at 9:53 AM, [EMAIL PROTECTED] wrote: Oh right, what I really meant was 'char' instead of 'long'. In fact I just took the type from the referenced article. Sorry for that. So am I right that the compiler should distinguish between char, signed char and unsigned char in the p

Re: LTO, LLVM, etc.

2005-12-05 Thread Jim Blandy
On 12/5/05, Chris Lattner <[EMAIL PROTECTED]> wrote: > That said, having a good representation for source-level exporting is > clearly useful. To be perfectly clear, I am not against a source- > level form, I am just saying that it should be *different* than the > one used for optimization. Debug

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread Joseph S. Myers
On Mon, 5 Dec 2005, Mike Stump wrote: > On Dec 5, 2005, at 9:53 AM, [EMAIL PROTECTED] wrote: > > Oh right, what I really meant was 'char' instead of 'long'. > > In fact I just took the type from the referenced article. Sorry for that. > > > > So am I right that the compiler should distinguish bet

Re: c++ speed 3.3/4.0/4.1

2005-12-05 Thread Mike Stump
On Dec 5, 2005, at 2:33 PM, Jack Howarth wrote: Do you mean using -fno-threadsafe-statics or do you have any other inlining changes in mind? That option mentions the word inline 0 times, while interesting and worthwhile to test, I did mean these (from the man page): -finline-limit=n an

Re: LTO, LLVM, etc.

2005-12-05 Thread Steven Bosscher
On Tuesday 06 December 2005 00:23, Jim Blandy wrote: > Debug information describes two things: (...snip...) > Keeping the two representations separate (which I could easily > see being beneficial for optimization) shifts that burden onto some > new party which isn't being discussed, and which will

GCC 3.4.5 status?

2005-12-05 Thread Steve Ellcey
Has GCC 3.4.5 been officially released? I don't recall seeing an announcement in gcc@gcc.gnu.org or [EMAIL PROTECTED] and when I looked on the main GCC page and I see references to GCC 3.4.4 but not 3.4.5. But I do see a 3.4.5 download on the GCC mirror site that I checked and I see a gcc_3_4_5_

Re: RFD: C pointer conversions that differ in unsignedness

2005-12-05 Thread Mike Stump
On Dec 5, 2005, at 3:25 PM, Joseph S. Myers wrote: OBringing bit-fields into the matter is just confusing things since you can't have pointers to bit-fields, but anyway char is not in a comma-separated set with signed char or unsigned char and for DR#315 it was proposed to say that whether ch

Re: MIPS: comparison modes in conditional branches

2005-12-05 Thread Jim Wilson
Adam Nemet wrote: Now if I am correct and this last thing is really a bug then the obvious question is whether it has anything to do with the more restrictive form for conditional branches on MIPS64? And of course if I fix it then whether it would be OK to lift the mode restrictions in the condi

Re: more strict-aliasing questions

2005-12-05 Thread Jim Wilson
Jack Howarth wrote: Is there some place where all the existing forms of strict-aliasing warnings are documented? So far I have only seen the error... We don't have such documentation unfortunately. There are 3 errors. There is the one you have seem. There is a similar one for incomplete

Re: problem with gcc 3.2.2

2005-12-05 Thread Jim Wilson
Mohamed Ghorab wrote: linux, it tries to compile some files but outputs the following error: /usr/include/c++/3.2.2/bits/fpos.h:60: 'streamoff' is used as a type, but is not defined as a type. This is a more appropriate question for the gcc-help list than the gcc list. The gcc list is primari

Re: Problem with bugzilla account

2005-12-05 Thread Jim Wilson
Eric Weddington wrote: I have a problem with making an email change for my bugzilla account. sysadmin requests can be sent to [EMAIL PROTECTED] -- Jim Wilson, GNU Tools Support, http://www.specifix.com

Re: LTO, LLVM, etc.

2005-12-05 Thread Mark Mitchell
Ian Lance Taylor wrote: > In short, while this is an important issue, I don't see it as strongly > favoring either side. What it means, essentially, is that LTO is not > quite as much work as it might otherwise seem to be, because we are > going to do some of the work anyhow. So when considering

Re: LTO, LLVM, etc.

2005-12-05 Thread Mark Mitchell
Steven Bosscher wrote: > On Saturday 03 December 2005 20:43, Mark Mitchell wrote: > >>There is one advantage I see in the LTO design over LLVM's design. In >>particular, the LTO proposal envisions a file format that is roughly at >>the level of GIMPLE. Such a file format could easily be extended

Re: ARM spurious load

2005-12-05 Thread Jim Wilson
Shaun Jackman wrote: The following code snippet produces code that loads a register, r5, from memory, but never uses the value. You can report things like this into our bugzilla database, marking them as enhancement requests. We don't keep track of issues reported to the gcc list. I took a

Re: LTO, LLVM, etc.

2005-12-05 Thread Mark Mitchell
Chris Lattner wrote: > I totally agree with Steven on this one. It is *good* for the > representation hosting optimization to be different from the > representation you use to represent a program at source level. The two > have very different goals and uses, and trying to merge them into one

Re: LTO, LLVM, etc.

2005-12-05 Thread Chris Lattner
On Dec 5, 2005, at 5:27 PM, Mark Mitchell wrote: Steven Bosscher wrote: IMVHO dumping for "export" and front-end tools and for the optimizers should not be coupled like this. Iff we decide to dump trees, then I would hope the dumper would dump GIMPLE only, not the full front end and middle-end

Re: LTO, LLVM, etc.

2005-12-05 Thread Chris Lattner
On Dec 5, 2005, at 5:43 PM, Mark Mitchell wrote: Chris Lattner wrote: I totally agree with Steven on this one. It is *good* for the representation hosting optimization to be different from the representation you use to represent a program at source level. The two have very different goals a

Re: Possible size-opt patch

2005-12-05 Thread Bernd Schmidt
Giovanni Bajo wrote: Bernd, I read you're interested in code-size optimizations. I'd like to point you to this patch: http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00554.html which was never finished nor committed (I don't know if RTH has a newer version though). This is would be of great help f

Re: LTO, LLVM, etc.

2005-12-05 Thread Andrew Pinski
> I don't see anything about Tree that I find inherently awful; in fact, > it looks very much like what I see in other front ends. There are > aspects I dislike (overuse of pointers, lack of type-safety, unncessary > copies of types), but I couldn't possibly justify changing the C++ > front-end, f

Re: LTO, LLVM, etc.

2005-12-05 Thread Mark Mitchell
Chris Lattner wrote: [Up-front apology: If this thread continues, I may not be able to reply for several days, as I'll be travelling. I know it's not good form to start a discussion and then skip out just when it gets interesting, and I apologize in advance. If I'd been thinking better, I would

crtstuff sentinels

2005-12-05 Thread DJ Delorie
The m32c-elf port uses PSImode for pointers, which, for m32c (vs m16c) only have 24 bits of precision in a 32 bit word. The address registers are 24 bit unsigned registers. The "-1" sentinal used for CTOR_LIST is not a representable address, and the code gcc ends up using compares 0x (th

Re: crtstuff sentinels

2005-12-05 Thread Paul Brook
> The "-1" sentinal used for CTOR_LIST is not a representable address, > and the code gcc ends up using compares 0x (the -1) with > 0x00ff (what ends up in $a0) and it doesn't match. > > Suggestions? Use ELF .init_array/.fini_array Paul

Re: c++ speed 3.3/4.0/4.1

2005-12-05 Thread Jack Howarth
Well I tried a few different builds of xplor-nih tonight with the following optimization flags for the gcc and g++ compilers... testsuite in seconds xplorpython tcl -O3 -ffastma

Re: LTO, LLVM, etc.

2005-12-05 Thread Gabriel Dos Reis
Steven Bosscher <[EMAIL PROTECTED]> writes: [...] | I'd be surprised if there a compiler exists that runs optimizations | on EDG's C++ specific representation. CFront was very good at implementing optimizations "native" compilers could not match at the time (or with 2 years lag). KCC did a grea

Re: GCC 3.4.5 status?

2005-12-05 Thread Gabriel Dos Reis
Steve Ellcey <[EMAIL PROTECTED]> writes: | Has GCC 3.4.5 been officially released? Yes, tarballs are on gcc.gnu.org and ftp.gnu.org since Dec 1st. Only official announcement is missing. [...] | I also notice we have a "Releases" link under "About GCC" in the top | left corner of the main GCC p

Re: GCC 3.4.5 status?

2005-12-05 Thread Kaveh R. Ghazi
> Steve Ellcey <[EMAIL PROTECTED]> writes: > > | Has GCC 3.4.5 been officially released? > > Yes, tarballs are on gcc.gnu.org and ftp.gnu.org since Dec 1st. Only > official announcement is missing. What are you waiting for? -- Kaveh R. Ghazi [EMAIL PROTECTED]

Why is -Wstrict-null-sentinel (C++ only)?

2005-12-05 Thread Chris Shoemaker
I want to warn at the use of unadorned "NULL" as sentinel value in C programs. Why is this option (-Wstrict-null-sentinel) restricted to C++ programs? Or is there some other way to get this warning? -chris (Please 'cc'; not subscribed)

Re: LTO, LLVM, etc.

2005-12-05 Thread Mark Mitchell
Steven Bosscher wrote: > What makes EDG so great is that it represents C++ far closer to the > actual source code than G++ does. I know the EDG front-end very well; I first worked with it in 1994, and I have great respect for both the EDG code and the EDG people. I disagree with your use of "far

Re: LTO, LLVM, etc.

2005-12-05 Thread Mathieu Lacage
hi mark, On Mon, 2005-12-05 at 21:33 -0800, Mark Mitchell wrote: > I'm not saying that having two different formats is necessarily a bad > thing (we've already got Tree and RTL, so we're really talking about two > levels or three), or that switching to LLVM is a bad idea, but I don't > think ther