Newsgroups: comp.unix.ultrix
Path: utzoo!utgpu!watserv1!watcgl!idallen
From: "Ian! D. Allen [CGL]" <idallen@watcgl.waterloo.edu>
Subject: Ultrix 4.1 cc2.0 and cc2.1 uopt/ugen core dump; also cc1.31 dump
Message-ID: <1991Mar11.164902.6021@watcgl.waterloo.edu>
Sender: idallen@watcgl.waterloo.edu (Ian! D. Allen [CGL])
Organization: Computer Graphics Laboratory, University of Waterloo, Ontario, Canada
Date: Mon, 11 Mar 1991 16:49:02 GMT
Lines: 37

If I had a typewriter, this would be a DEC SPR.

ULTRIX V4.1 (Rev. 52) on a DS5400

    % cc2.0 -c i.c
    Fatal error in: /usr/lib/cmplrs/cc2.0/ugen Trace/BPT trap - core dumped
    % cc2.0 -O -c i.c
    Fatal error in: /usr/lib/cmplrs/cc2.0/uopt Segmentation fault - core dumped

    % cc2.1 -c i.c
    Fatal error in: /usr/lib/cmplrs/cc2.1/ugen Trace/BPT trap - core dumped
    % cc2.1 -O -c i.c
    Fatal error in: /usr/lib/cmplrs/cc2.1/uopt Segmentation fault - core dumped

Ultrix V3.1C (Rev. 41) on a DS5400

    Same core dumps for cc1.31 and cc2.1 on Ultrix 3.1C.

Source (smallest example producing the problem):

    /* Code courtesy of AHVermen@watcgl.waterloo.edu */
    struct foo {
	int x;
    };

    static struct foo vec[2];
    static struct foo y;
    static struct foo x;
    static int flag;

    main()
    {
	x = flag ? (vec[0]=y) : (vec[1]=y) ;
    }
-- 
-IAN! (Ian! D. Allen) idallen@watcgl.uwaterloo.ca idallen@watcgl.waterloo.edu
 [129.97.128.64]  Computer Graphics Lab/University of Waterloo/Ontario/Canada
