This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc problem (bug?)


 Hi,

	I'm not sure this goes here, maybe it should go to a gcc specific
list, if so please let me know or forward my mail, in any case, please
CC me as I'm not registered to any of these lists.

	I'm using gcc 2.95.2-5 from the 1.1.6 release. but I've also tried
2.95.2-7 from the 1.1.8 release with exactly the same results.

	It seems I've stumbled upon what seems to be bug in gcc, when compiling
with optimization level higher than zero a local function variable gets
overwritten by subsequent calles to other functions within and not restored,
pseudo code example:

	func1(param1, param2) {
		internal_func(param1);

		<- at this point, param1 is not restored and is filled with values
			from its internal state inside internal_func().

	}

	In my case, param1 gets fitted optimized and put into ESI.

	The problem is very much reproduceable, my code works fine
at optimization level zero and breaks at level one or higher.

	The code is a part of an NT driver I'm writing, it's running
in kernel mode. I've had no similar problems so far, this is very
peculiar.

	 bye,
		Marc.

--
marc @ corky.net

fingerprint = D1F0 5689 967F B87A 98EB  C64D 256A D6BF 80DE 6D3C

          /"\
          \ /     ASCII Ribbon Campaign
           X      Against HTML Mail
          / \

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]