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


> 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.)

Here is revised test.  OK?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2001-0604  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* gcc.c-torture/execute/20010604-1.c: New test.

--- /dev/null	Mon Jun  4 14:11:13 2001
+++ gcc.c-torture/execute/20010604-1.c	Mon Jun  4 14:56:14 2001
@@ -0,0 +1,14 @@
+#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;
+}
+
+int main (void)
+{
+  if (f (1, 2, -3, true, true, true, '\001'))
+    abort ();
+  exit (0);
+}


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