This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: fix argument promotion
- To: jsm28 at cam dot ac dot uk (Joseph S. Myers)
- Subject: Re: PATCH: fix argument promotion
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 4 Jun 2001 15:20:57 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
> 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);
+}