public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/22017] New: Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags
@ 2005-06-11 14:43 lyuzhou at 21cn dot com
  2005-06-12 15:08 ` [Bug target/22017] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: lyuzhou at 21cn dot com @ 2005-06-11 14:43 UTC (permalink / raw)
  To: gcc-bugs

System type: Microsoft Windows 2000 [Version 5.00.2195]

Sources file for reproducing the bug:
========= main.cpp (begin) =========
extern "C" void __cdecl _assert (const char*, const char*, int);
#define assert(e)       ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))

struct st_t {
    int m_i;
    char m_ch[260];
};

void foo(int *pInt, struct st_t st)
{
    assert(*pInt == 123);
}

int main()
{
    int i = 123;

    struct st_t st;
    st.m_i = 1;
    st.m_ch[0] = 0;

    foo(&i, st);
    return 0;
}
========= main.cpp (end) =========

Error output when execute the object file(a.exe):
========= error (begin) ===========
Assertion failed: *pInt == 123, file main.cpp, line 11

abnormal program termination
========= error (end) ===========

The command line and other information:
========== compile information (begin) ============
>gcc -v -save-temps -march=i386 -mrtd main.cpp
Reading specs from 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --
host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --
enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-
shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x -
-enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-
synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.4 (mingw special)
 D:/Elastos/extern/gnuSDK.x86/bin/../libexec/gcc/mingw32/3.4.4/cc1plus.exe -E -
quiet -v -iprefix D:\Elastos\extern\gnuSDK.x86\bin/../lib/gcc/mingw32/3.4.4/ 
main.cpp -march=i386 -mrtd -o main.ii
ignoring nonexistent 
directory "D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../..
/mingw32/include"
ignoring nonexistent 
directory "/mingw/lib/gcc/mingw32/../../../include/c++/3.4.4"
ignoring nonexistent 
directory "/mingw/lib/gcc/mingw32/../../../include/c++/3.4.4/mingw32"
ignoring nonexistent 
directory "/mingw/lib/gcc/mingw32/../../../include/c++/3.4.4/backward"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.4/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c+
+/3.4.4
 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c+
+/3.4.4/mingw32
 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../include/c+
+/3.4.4/backward
 D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../include
 D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/include
 /mingw/lib/gcc/mingw32/../../../include
 /mingw/include
 /mingw/include
End of search list.
 D:/Elastos/extern/gnuSDK.x86/bin/../libexec/gcc/mingw32/3.4.4/cc1plus.exe -
fpreprocessed main.ii -quiet -dumpbase main.cpp -march=i386 -mrtd -auxbase 
main -version -o main.s
GNU C++ version 3.4.4 (mingw special) (mingw32)
	compiled by GNU C version 3.4.4.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32614
 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../mingw32/bi
n/as.exe -o main.o main.s
 D:/Elastos/extern/gnuSDK.x86/bin/../libexec/gcc/mingw32/3.4.4/collect2.exe -
Bdynamic /mingw/lib/crt2.o 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/crtbegin.o -
LD:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4 -
LD:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc -
LD:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../../../mingw32/l
ib -L/mingw/lib/gcc/mingw32/../../../mingw32/lib -L/mingw/lib -
LD:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/../../.. -
L/mingw/lib/gcc/mingw32/../.. main.o -lmingw32 -lgcc -lmoldname -lmingwex -
lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -
lmingwex -lmsvcrt 
D:/Elastos/extern/gnuSDK.x86/bin/../lib/gcc/mingw32/3.4.4/crtend.o
========== compile information (end) ============

-- 
           Summary: Error to pass struct parameter when compile with mingw's
                    gcc.exe using "-march=i386 -mrtd" flags
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lyuzhou at 21cn dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Microsoft Windows 2000
  GCC host triplet: --host=mingw32
GCC target triplet: --target=mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-02-16 15:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:52 ` [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags pinskia at gcc dot gnu dot org
2005-10-31  3:45 ` mmitchel at gcc dot gnu dot org
2005-10-31  4:30 ` dannysmith at users dot sourceforge dot net
2006-02-16 11:31 ` [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd rguenth at gcc dot gnu dot org
2006-02-16 12:29 ` pinskia at gcc dot gnu dot org
2006-02-16 13:22 ` rguenth at gcc dot gnu dot org
2006-02-16 13:25 ` rguenth at gcc dot gnu dot org
2006-02-16 13:34 ` rguenth at gcc dot gnu dot org
2006-02-16 13:36 ` rguenth at gcc dot gnu dot org
2006-02-16 15:50 ` rguenth at gcc dot gnu dot org
2005-06-11 14:43 [Bug c/22017] New: Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags lyuzhou at 21cn dot com
2005-06-12 15:08 ` [Bug target/22017] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-13  5:42 ` lyuzhou at 21cn dot com
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:02 ` mmitchel at gcc dot gnu dot org

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