This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: EGCS 1.0.2. switch in inline functions.


Alexander Favorov <favorov@sensi.org> writes:
> Hi!
> The code :
> ************************
> #include <stdio.h>
> 
> inline
> int func(char c)
> {
> 	switch (c)
> 	{
> 	case 'a':return 1;
> 	case 't':return 2;
> 	case 'g':return 3;
> 	case 'c':return 4;
> 	case 'n':return 5;
> 	}
> }
> 
> main()
> {
> 	printf("%i\n",func('g'));
> 	return 0;
> }

Hi Alexander,

I just submitted a patch, using your testcase as example, but forgetting
to cite your posting -- my apologies, to egcs-patches that solves this 
code generation bug in the win32 backend.

Sorry it took so long to fix. This was a subtle one that doesn't show
up if you kill one of the case statements from the testcase.

Regards,
Mumit



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