public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* compile/961203-1.c
@ 1997-10-28 22:39 Jeffrey A Law
  1997-10-30  0:04 ` compile/961203-1.c Alexandre Oliva
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1997-10-28 22:39 UTC (permalink / raw)
  To: egcs

Just a note -- I've set this test up so that it just xfails without
ever attempting to compile it.

--
Jeff Law (law@cygnus.com)
Cygnus Solutions		EGCS GNU Compiler System
http://www.cygnus.com		http://www.cygnus.com/egcs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile/961203-1.c
  1997-10-28 22:39 compile/961203-1.c Jeffrey A Law
@ 1997-10-30  0:04 ` Alexandre Oliva
  1997-10-30  8:09   ` compile/961203-1.c Jeffrey A Law
  1997-10-30 11:56   ` compile/961203-1.c Jim Wilson
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Oliva @ 1997-10-30  0:04 UTC (permalink / raw)
  To: law; +Cc: egcs

Jeffrey A Law writes:

> Just a note -- I've set this test up so that it just xfails without
> ever attempting to compile it.

Haven't you applied that patch I have submitted, that tests for the
error this test produced and emits an appropriate error message in the
compiler?  If you have, you may let this test case be compiled, so
that, when the problem is fixed, we'll all be notified :-)

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile/961203-1.c
  1997-10-30  0:04 ` compile/961203-1.c Alexandre Oliva
@ 1997-10-30  8:09   ` Jeffrey A Law
  1997-10-30 11:56   ` compile/961203-1.c Jim Wilson
  1 sibling, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1997-10-30  8:09 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs

  In message < or4t5zllz7.fsf@grupiara.dcc.unicamp.br >you write:
  > Haven't you applied that patch I have submitted, that tests for the
  > error this test produced and emits an appropriate error message in the
  > compiler?  If you have, you may let this test case be compiled, so
  > that, when the problem is fixed, we'll all be notified :-)
The last attempt to fix this problem broke the g77 front end -- for
now the safest thing to do is just fail the test.

We'll revisit once the first release is out the door.
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compile/961203-1.c
  1997-10-30  0:04 ` compile/961203-1.c Alexandre Oliva
  1997-10-30  8:09   ` compile/961203-1.c Jeffrey A Law
@ 1997-10-30 11:56   ` Jim Wilson
  1 sibling, 0 replies; 4+ messages in thread
From: Jim Wilson @ 1997-10-30 11:56 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs

Your patch is not correct.

You can't verify whether a size is negative by checking TREE_INT_CST_LOW.
Type sizes are stored as a pair of integers, and are negative only if
TREE_INT_CST_HIGH is negative.  Your patch will break 32 bit to 64 bit
cross compilation, because in such a case we need both integers to correctly
handle 64 bit type sizes, and it is easy for TREE_INT_CST_LOW to appear
to be negative when the entire value is not negative.  It isn't clear if
your patch will still if you check TREE_INT_CST_HIGH instead; I haven't
tried checking this.

Also, just because TREE_INT_CST_HIGH is negative does not mean that there
is a problem.  If you are cross compiling from a 32 bit host to a 64 bit
target, and you have a structure size which is very large, it could be
that TREE_INT_CST_HIGH will appear to be negative.  Gcc should not fail
for such a case.  Type sizes should be unsigned values, so ones that appear
to be negative should still be OK.

The proper way to handle this is to check whether a type size computation
resulted in an overflow.  In that case, and only in that case, gcc should fail.

We did try such a patch.  Unfortunately, this patch broke the Fortran front
end and had to be removed.  It turns out that the Fortran front end
intentionally generates an array large enough to cause a type size overflow.
We need to find a way to fix this problem, and then we can readd the type
size overflow error patch to fix the compile/961203-1.c problem.

Jim

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-10-30 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-28 22:39 compile/961203-1.c Jeffrey A Law
1997-10-30  0:04 ` compile/961203-1.c Alexandre Oliva
1997-10-30  8:09   ` compile/961203-1.c Jeffrey A Law
1997-10-30 11:56   ` compile/961203-1.c Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).