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]
Other format: [Raw text]

[Bug c/17168] [3.4/3.5 Regression] incorrect value passed to subroutine


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


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