public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Bug: regparm and fastcall messes up parameters in certain cases
@ 2003-08-25  7:07 lightspeed
  0 siblings, 0 replies; only message in thread
From: lightspeed @ 2003-08-25  7:07 UTC (permalink / raw)
  To: gcc-bugs

[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]

Hi,
   This is my second bug report, so please excuse me for giving you too much
or too few information. Please if you have the time give me advices how to
write bug-reports in the future(what is good/wrong with this one). I tried
to follow the bug-reporting specified in gcc's documentation. I'll begin
with the description of the bug, you can find additional info
towards the end of this mail.

	The bug is that function buggycall gets its parameters heavily
messed up!!
	All functions should in my opinion output its parameters' values
like 1,2,3,4. Functions buggycall2 and buggycall3 output "1,2,3,4" as they
should, but function buggycall outputs "4 0 1097054101 134513542" that is
NOT what got passed to it.
    This looks like a parameter passing error, and as you can see from the
source file it only occurs when I don't declare a prototype for the function
and I put the calling convention after the return type. Putting the calling
convention before the return type solves the problem, but then my program
doesn't compiles with MSVC++, cause it is a violation of its syntax(I
guess).
    This bug occurs both with  gcc and g++. This bug occurs in mingw32 too.

    Please fix this bug.

!!!!the files are in files.tar.gz:!!!!!!!
//bugrep2.cpp : a simplified version of a program that triggers the bug
//bugrep2.ii : the preprocessor output as required in the gcc docs
//bugrep2.s : the assembler source file generated by g++

!!!!! GCC version is:3.2.2 20030222
(Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
)

>> output of uname -a:
Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 16:42:56 EST 2003 i586
i586 i386 GNU/Linux
>> /etc/redhat-release:
Red Hat Linux release 9 (Shrike)

>>/proc/cpuinfo:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 5
model           : 8
model name      : AMD-K6(tm) 3D processor
stepping        : 12
cpu MHz         : 267.278
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow
k6_mtrr
bogomips        : 532.48



>> comand-line to make Bugrep.ii and Bugrep.s was:
g++ -g -o bugrep2 -g  -save-temps Bugrep.cpp


Thanks for reading this bug-report.
I'm waiting for replys to: edwin@bartok.ro, or lightspeed@as.ro


    Torok Edwin


______________________________________________________________
Get your free email adress and webhosting at http://www.as.ro .


[-- Attachment #2: files.tar.gz --]
[-- Type: application/x-gzip-compressed, Size: 10809 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-25  7:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-25  7:07 Bug: regparm and fastcall messes up parameters in certain cases lightspeed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).