This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem with purge_addressof (function.c)


On 20-Feb-2001, Lieven Marchand <mal@wyrd.be> wrote:
> I've checked out PR 2035 which claims to be an ICE for valid
> code. It's an ICE all right but the code is invalid.

The code is valid code.  The behaviour if you execute it may be
undefined, but the ICE shows up even if the code is not executed:

	int foo(int v0, char **v1)
	{
	    double v8;
	    union {
		struct {
		    float f34;
		    float f35;
		} f;
	    } d65;

	    d65.f.f34 = *(float *) &v8;
	    return 0;
	}

	int main(int v0, char **v1)
	{
	    return 0;
	}

The above is, I believe, a strictly conforming ISO C program,
but gcc ICEs on it.  (BTW this is a regression from egcs-1.1.2.)

> Should this limitation be removed or should purge_addressof handle
> this case differently and if so how?

I only know that it is a bug, and so should be fixed; I don't know
what the right fix is.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]