Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Short Program That Crashes CC (OSF 2.1 and OSF 3.0)
@ 1995-01-25 23:04 Jon Forrest
  1995-01-26 18:33 ` Dennis Murphy
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Forrest @ 1995-01-25 23:04 UTC (permalink / raw)


Consider the following program fragment:

extern char *foo(char *);

void main()
{
        char *siteName[128] = foo("HELLO");
}

Compiling it on both OSF 2.1 and OSF 3.0 results in the following:

% cc -c j.c
Assertion failed: (((((ty)->tree_common).code) == Struct_type) || ((((ty)->tree_common).code) == Longdouble_type && (bit_size[Target_LongDouble] == 128))), file ../../../../../../src/usr/ccs/bin/cfe/expr_cg.c, line 5270
Fatal error in: /usr/lib/cmplrs/cc/cfe IOT/Abort trap 


Maybe somebody could try it on a field test version of OSF 3.2.


-- 
Anything you read here is my opinion and in no way represents the Univ. of Cal.
Jon Forrest WB6EDM	 forrest@cs.berkeley.edu	 510-643-6764
377 Soda Hall, Univ. of Cal., Berkeley, CA. 94720-1776


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

* Re: Short Program That Crashes CC (OSF 2.1 and OSF 3.0)
  1995-01-25 23:04 Short Program That Crashes CC (OSF 2.1 and OSF 3.0) Jon Forrest
@ 1995-01-26 18:33 ` Dennis Murphy
  0 siblings, 0 replies; 2+ messages in thread
From: Dennis Murphy @ 1995-01-26 18:33 UTC (permalink / raw)




>Consider the following program fragment:
>
>extern char *foo(char *);
>
>void main()
>{
>        char *siteName[128] = foo("HELLO");
>}
>
>Compiling it on both OSF 2.1 and OSF 3.0 results in the following:
>
>% cc -c j.c
>Assertion failed: (((((ty)->tree_common).code) == Struct_type) || ((((ty)->tree_common).code) == Longdouble_type && (bit_size[Target_LongDouble] == 128))), file ../../../../../../src/usr/ccs/bin/cfe/expr_cg.c, line 5270
>Fatal error in: /usr/lib/cmplrs/cc/cfe IOT/Abort trap

    Here are the results using the cc -migrate compiler...

motie.zko.dec.com> cc -migrate -c t.c
cc: Warning: t.c, line 5: In the initializer for siteName[0], "foo" is not const
ant, but occurs in a context that requires a constant expression.  This is an ex
tension of the language.
        char *siteName[128] = foo("HELLO");
------------------------------^
motie.zko.dec.com> more t.c
extern char *foo(char *);

void main()
{
        char *siteName[128] = foo("HELLO");
}


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

end of thread, other threads:[~1995-01-26 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-01-25 23:04 Short Program That Crashes CC (OSF 2.1 and OSF 3.0) Jon Forrest
1995-01-26 18:33 ` Dennis Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox