This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17168] [3.4/3.5 Regression] incorrect value passed to subroutine
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2004 15:31:20 -0000
- Subject: [Bug c/17168] [3.4/3.5 Regression] incorrect value passed to subroutine
- References: <20040824142916.17168.kminola@eng.umd.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-24 15:31 -------
I can reproduce it on 3.4 and 3.5 with the following code on x86:
#include <stdio.h>
void
foo(D)
long long D;
{
if (D < 0) {
printf("correct\n");
} else {
printf("bug\n");
}
}
int
main()
{
int D;
D = -1;
foo(D);
return(0);
}
I don't know if this is valid code because IIRC K&R C style functions are not right anyways to use with
64bit targets but I could be wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Known to fail| |3.4.0 3.5.0
Known to work| |3.3.3
Summary|incorrect value passed to |[3.4/3.5 Regression]
|subroutine |incorrect value passed to
| |subroutine
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17168