public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21275] New: gcc 4.0.0 crash with mingw when using stdout in global var
@ 2005-04-29  5:46 ch dot ehrlicher at gmx dot de
  2005-04-29  6:11 ` [Bug c/21275] " dannysmith at users dot sourceforge dot net
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ch dot ehrlicher at gmx dot de @ 2005-04-29  5:46 UTC (permalink / raw)
  To: gcc-bugs

This small piece of code doesn't work with gcc 4.0.0, but with 3.4/3.3:

-----------------------------------------
#include <stdio.h>
#include <stdlib.h>

FILE* out = stdout;

int main( int argc, char **argv )
{
//  out = stdout; // this is ok
  return 0;
}
-----------------------------------------

Here the output:
C:\tmp>gcc main.c
main.c:4: error: initializer element is not constant

C:\tmp>g++ main.c
main.c:9: internal compiler error: output_operand: invalid expression as operand

Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

C:\tmp>gcc -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.0.0/configure --with-gcc --with-gnu-ld --with-gnu-as -
-host=mingw32 --target=mingw32 --prefix=/mingw --enable-languages=c,c++ --enable
-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-e
xceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enab
le-libstdcxx-debug : (reconfigured) ../gcc-4.0.0/configure --disable-libada --wi
th-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/min
gw --enable-languages=c,c++ --enable-threads --disable-nls --disable-win32-regis
try --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 4.0.0

-- 
           Summary: gcc 4.0.0 crash with mingw when using stdout in global
                    var
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ch dot ehrlicher at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-09-27 16:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-29  5:46 [Bug c/21275] New: gcc 4.0.0 crash with mingw when using stdout in global var ch dot ehrlicher at gmx dot de
2005-04-29  6:11 ` [Bug c/21275] " dannysmith at users dot sourceforge dot net
2005-04-30  9:08 ` dannysmith at users dot sourceforge dot net
2005-04-30 15:35 ` [Bug c/21275] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-30 21:40 ` dannysmith at users dot sourceforge dot net
2005-05-01  8:00 ` dannysmith at users dot sourceforge dot net
2005-05-01 11:28 ` ch dot ehrlicher at gmx dot de
2005-05-01 13:16 ` [Bug middle-end/21275] " pinskia at gcc dot gnu dot org
2005-05-01 13:17 ` pinskia at gcc dot gnu dot org
2005-05-07 20:20 ` pinskia at gcc dot gnu dot org
2005-05-26 21:22 ` dannysmith at users dot sourceforge dot net
2005-06-01 21:02 ` dannysmith at users dot sourceforge dot net
2005-06-05  6:52 ` pinskia at gcc dot gnu dot org
2005-07-06 17:03 ` [Bug target/21275] " mmitchel at gcc dot gnu dot org
2005-07-30  6:31 ` jvdelisle at gcc dot gnu dot org
2005-09-27 16:17 ` 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).