Subject: Re: Turning off optimization on selected files.
To: Simon Burge <>
From: Eduardo Horvath <>
List: tech-kern
Date: 06/08/2000 16:10:04
On Fri, 9 Jun 2000, Simon Burge wrote:

> Eduardo Horvath wrote:
> > Fine.  I'm happy as long as I can override things and don't need to
> > compile individual files by hand.
> What would be really knarly would be something like
> 	#pragma noopt
> 		``bad'' code here
> 	#pragma defopt
> either at a statement or function level, where '#pragma defopt' would
> reset optimisation back to whatever was specified on the command line...
> Is this even remotes feasible in gcc?

This is not at all related to my problem.  There are 3-4 kernel files in
the kernel which cause gcc to core dump when compiling the sparc V9
instruction set if optimization is turned on.  It's not a question of bad
code, or incorrect code.  gcc simply falls on its face. The only thing to
do is turn off optimization for those files to work around gcc bugs.  

Eduardo Horvath