From txix@diku.dk  Fri May 17 00:15:21 1996
Received: from vidar.diku.dk (root@vidar.diku.dk [130.225.96.249])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA22218
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 May 1996 00:15:19 -0700 (PDT)
Received: from tyr.diku.dk (txix@tyr.diku.dk [130.225.96.226]) by vidar.diku.dk (8.6.12/8.6.12) with ESMTP id JAA06030 for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 May 1996 09:15:11 +0200
Received: (txix@localhost) by tyr.diku.dk (8.6.12/8.6.12) id JAA05147; Fri, 17 May 1996 09:15:10 +0200
Message-Id: <199605170715.JAA05147@tyr.diku.dk>
Date: Fri, 17 May 1996 09:15:10 +0200
From: txix@diku.dk
Reply-To: txix@diku.dk
To: FreeBSD-gnats-submit@freebsd.org
Subject: gcc bug report
X-Send-Pr-Version: 3.2

>Number:         1210
>Category:       gnu
>Synopsis:       gcc (v2.6.3) -O and -O2 compile-time bus error
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    peter
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 17 00:20:01 PDT 1996
>Closed-Date:    Mon Oct 7 16:43:57 PDT 1996
>Last-Modified:  Mon Oct  7 16:46:50 PDT 1996
>Originator:     Peter Holst Andersen
>Release:        FreeBSD 2.1.0-RELEASE i386
>Organization:
None
>Environment:

	Pentium 100 MHz, 256 Kb Pipeline burst cache, 430FX Chipset, 16 Mb ram.
	gcc version 2.6.3

>Description:

	Compilation of the program below with gcc -O yields:
	"gcc: Internal compiler error: program cc1 got fatal signal 10"
	The same error message appears when trying with -O2, but not with
	-O3 or -O4.

>How-To-Repeat:

	Compilation of the program below with gcc -O will repeat the error

struct s1 { double x, y, z; };
struct s2 { double r, g, b; };

struct s3 {
    struct s1 p;
    struct s2 c;
};

void create_light(struct s3 *li,
		  double x, double y, double z,
		  double r, double g, double b)
{
    li->p.x = x;
    li->p.y = y;
    li->p.z = z;
    li->c.r = r;
    li->c.g = g;
    li->c.b = b;
}


>Fix:

	Work-around: declare "li" volatile.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: wosch 
State-Changed-When: Tue Sep 24 17:23:56 PDT 1996 
State-Changed-Why:  
We are now update to gcc 2.7.2  


Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Tue Sep 24 17:23:56 PDT 1996 
Responsible-Changed-Why:  
State-Changed-From-To: analyzed->closed 
State-Changed-By: peter 
State-Changed-When: Mon Oct 7 16:43:57 PDT 1996 
State-Changed-Why:  
This appears to work OK with gcc-2.7.2.1 in -current 
>Unformatted:
