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
* [Bug c/21275] gcc 4.0.0 crash with mingw when using stdout in global var
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 ` dannysmith at users dot sourceforge dot net
2005-04-30 9:08 ` dannysmith at users dot sourceforge dot net
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-04-29 6:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-04-29 06:11 -------
Here is reduced testcase:
// int attribute ((dllimport)) foo;
extern int* _imp__foo;
int a = *_imp__foo;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/21275] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-04-30 9:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-04-30 09:08 -------
Oops, I reduced the code in comment #1 too much. This shows the problem.
//dllimport_array.C
// This causes 'initializer element is not constant' error in C,
// static_initialization_and_destruction code in C++
extern __attribute__ ((dllimport)) int* foo1;
int* k = &foo1[0];
// This causes 'initializer element is not constant' error in C,
// ICE in C++
extern __attribute__ ((dllimport)) int foo2[];
int* j = &foo2[0];
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dannysmith at users dot
| |sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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 ` pinskia at gcc dot gnu dot org
2005-04-30 21:40 ` dannysmith at users dot sourceforge dot net
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-30 15:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-30 15:35 -------
I think this is a dup of bug 21081.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |21081
Summary|gcc 4.0.0 crash with mingw |[4.0/4.1 Regression] gcc
|when using stdout in global |4.0.0 crash with mingw when
|var |using stdout in global var
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (2 preceding siblings ...)
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
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-04-30 21:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-04-30 21:40 -------
I think DECL_NON_ADDR_CONST_P is set too late.
Regtesting a patch that fixes 21081 and this.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (3 preceding siblings ...)
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
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-05-01 8:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-05-01 08:00 -------
Patch at:
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00009.html
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (4 preceding siblings ...)
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
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ch dot ehrlicher at gmx dot de @ 2005-05-01 11:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ch dot ehrlicher at gmx dot de 2005-05-01 11:28 -------
the patch in comment #5 works for me
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (5 preceding siblings ...)
2005-05-01 11:28 ` ch dot ehrlicher at gmx dot de
@ 2005-05-01 13:16 ` pinskia at gcc dot gnu dot org
2005-05-01 13:17 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 13:16 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |05/msg00009.html
Status|UNCONFIRMED |NEW
Component|c |middle-end
Ever Confirmed| |1
Keywords| |ice-on-valid-code, patch,
| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2005-05-01 13:16:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (6 preceding siblings ...)
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
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 13:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (7 preceding siblings ...)
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
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-07 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-07 20:20 -------
*** Bug 21447 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ceniza666 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (8 preceding siblings ...)
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
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-05-26 21:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-05-26 21:01 -------
New patch submitted here:
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02543.html
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (9 preceding siblings ...)
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
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-06-01 21:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-06-01 21:02 -------
The patch referred to in comment #9 had missing hunks.
Complete patch here:
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02945.html
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (10 preceding siblings ...)
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
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 6:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 06:52 -------
New patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02945.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc- |http://gcc.gnu.org/ml/gcc-
|patches/2005- |patches/2005-
|05/msg00009.html |05/msg02945.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (11 preceding siblings ...)
2005-06-05 6:52 ` pinskia at gcc dot gnu dot org
@ 2005-07-06 17:03 ` 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
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-06 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-07-06 17:02 -------
Postponed until 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (12 preceding siblings ...)
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
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-07-30 6:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jvdelisle at gcc dot gnu dot org 2005-07-30 06:29 -------
Can or will this patch be put into mainline? Seems to be falling in a crack.
It is needed to help with moving forward on pr23138. I will apply the patch
given here. My first attempts failed, maybe I have to do it manually.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21275
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/21275] [4.0/4.1 Regression] gcc 4.0.0 crash with mingw when using stdout in global var
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
` (13 preceding siblings ...)
2005-07-30 6:31 ` jvdelisle at gcc dot gnu dot org
@ 2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
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).