This is the mail archive of the gcc-patches@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: PATCH: fix argument promotion


On Mon, 4 Jun 2001, John David Anglin wrote:

> The testcase that I have is below.  Not sure where or how is should be
> hooked into the testsuite.

Put it in gcc.c-torture/execute/.  (Though it may be better to abort () if 
f returns non-zero, rather than using the exit status.)

> 
> Dave
> -- 
> J. David Anglin                                  dave.anglin@nrc.ca
> National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
> 
> #include <stdbool.h>
> 
> int f (int a, int b, int c, _Bool d, _Bool e, _Bool f, char g)
> {
>   if (g != 1 || d != true || e != true || f != true) abort ();
>   return a + b + c;
> }
> 
> main ()
> {
>   exit (f (1, 2, -3, true, true, true, '\001'));
> }
> 

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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