public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin
@ 2013-04-16  8:00 davek at gcc dot gnu.org
  2013-04-16  9:37 ` [Bug target/56975] " ktietz at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2013-04-16  8:00 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56975
           Summary: [regression] dllimport broken on i686-pc-cygwin
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: davek@gcc.gnu.org


Created attachment 29880
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29880
preprocessed testcase

Attempting to reference a dllimported symbol with current HEAD causes an ICE
with an unrecognized insn.  This breaks bootstrap at stage1 building libgcc. 
Here's a testcase using stage1 cc1.exe from a failed build dir:

$ cat foo.i

void *foo (void);

__attribute__((dllimport)) void * __attribute__((__stdcall__)) bar(const char *
lpModuleName);

void *
foo (void)
{
  void *ptr = bar ((const char *)0);
  return ptr;
}

DKAdmin@ubik /gnu/gcc/obj/i686-pc-cygwin/libgcc
$ /gnu/gcc/obj/./gcc/cc1.exe -fpreprocessed foo.i -quiet  -mtune=generic
-march=i686 -auxbase-strip crtbegin.o -g -g -g0 -O2 -O2 -O2 -Wextra -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-tree-vectorize -fno-stack-protector -fno-omit-frame-pointer -o foo.s
GNU C (GCC) version 4.9.0 20130416 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.2, GMP version 4.3.2, MPFR version
3.0.1-p4, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.9.0 20130416 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.2, GMP version 4.3.2, MPFR version
3.0.1-p4, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 31da135ea647c81f0b254283fbd2bab6
foo.i: In function ‘foo’:
foo.i:11:1: error: unrecognizable insn:
 }
 ^
(insn 6 5 7 2 (set (reg:SI 61)
        (symbol_ref:SI ("bar@4") [flags 0x441] <function_decl 0x7fdf9c00 bar>))
foo.i:9 -1
     (nil))
foo.i:11:1: internal compiler error: in extract_insn, at recog.c:2150

foo.i:11:1: internal compiler error: Aborted
Aborted (core dumped)

DKAdmin@ubik /gnu/gcc/obj/i686-pc-cygwin/libgcc
$
>From gcc-bugs-return-420363-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 16 08:47:16 2013
Return-Path: <gcc-bugs-return-420363-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2259 invoked by alias); 16 Apr 2013 08:47:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 2216 invoked by uid 48); 16 Apr 2013 08:47:11 -0000
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50410] [4.7/4.8/4.9 Regression] ICE in record_reference
Date: Tue, 16 Apr 2013 08:47:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zeccav at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Changed-Fields: Version
Message-ID: <bug-50410-4-lhWijA69Km@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-50410-4@http.gcc.gnu.org/bugzilla/>
References: <bug-50410-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg01508.txt.bz2
Content-length: 437


http://gcc.gnu.org/bugzilla/show_bug.cgi?idP410

Vittorio Zecca <zeccav at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.7.0                       |4.8.0

--- Comment #14 from Vittorio Zecca <zeccav at gmail dot com> 2013-04-16 08:47:09 UTC ---
I still have the same bug on gfortran 4.8.0.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
@ 2013-04-16  9:37 ` ktietz at gcc dot gnu.org
  2013-04-17  2:31 ` alexpux at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-04-16  9:37 UTC (permalink / raw)
  To: gcc-bugs


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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-04-16 09:37:38 UTC ---
Hmm, as this bug seems not to happen for mingw 32-bit, it might be related to
definition of DEFAULT_ABI for 32-bit.  Does it help to set in cygming.h header
the line '#define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI)' to '#define
DEFAULT_ABI (TARGET_64BIT ? MS_ABI : MS_ABI)' ?
If so, we need an new definition to indicate pe-coff ABI instead.  At some
places we are using here check DEFAULT_ABI == MS_ABI etc, which might cause for
32-bit here the issue.  See for example the code in predicate.md, i386.c, etc.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
  2013-04-16  9:37 ` [Bug target/56975] " ktietz at gcc dot gnu.org
@ 2013-04-17  2:31 ` alexpux at gmail dot com
  2013-04-18 15:58 ` jojelino at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: alexpux at gmail dot com @ 2013-04-17  2:31 UTC (permalink / raw)
  To: gcc-bugs


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

Alexey Pavlov <alexpux at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexpux at gmail dot com

--- Comment #2 from Alexey Pavlov <alexpux at gmail dot com> 2013-04-17 02:31:41 UTC ---
I try to change line in cygming.h. Now It doesn't show error but xgcc processes
freezing alltime and build cannot be done.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
  2013-04-16  9:37 ` [Bug target/56975] " ktietz at gcc dot gnu.org
  2013-04-17  2:31 ` alexpux at gmail dot com
@ 2013-04-18 15:58 ` jojelino at gmail dot com
  2013-04-18 18:19 ` ktietz at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jojelino at gmail dot com @ 2013-04-18 15:58 UTC (permalink / raw)
  To: gcc-bugs


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

gee <jojelino at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jojelino at gmail dot com

--- Comment #3 from gee <jojelino at gmail dot com> 2013-04-18 15:58:53 UTC ---
*** Bug 56952 has been marked as a duplicate of this bug. ***


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-04-18 15:58 ` jojelino at gmail dot com
@ 2013-04-18 18:19 ` ktietz at gcc dot gnu.org
  2013-04-19  4:56 ` alexpux at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-04-18 18:19 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-04-18 18:19:28 UTC ---
Created attachment 29898
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29898
Patch for supporting cygwin32's SYSV_ABI proper

This patch should fix the reported issue.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-04-18 18:19 ` ktietz at gcc dot gnu.org
@ 2013-04-19  4:56 ` alexpux at gmail dot com
  2013-04-19  8:18 ` ktietz at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: alexpux at gmail dot com @ 2013-04-19  4:56 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Alexey Pavlov <alexpux at gmail dot com> 2013-04-19 04:56:31 UTC ---
With your patch I also has freeze xgcc on building stage2


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-04-19  4:56 ` alexpux at gmail dot com
@ 2013-04-19  8:18 ` ktietz at gcc dot gnu.org
  2013-04-19 14:26 ` jojelino at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-04-19  8:18 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-04-19 08:18:13 UTC ---
At what place it freezes?  Can you provide a testcase?  Are you sure it is
really related to the patch?  What makes you think that?

All in all, what I mean about those questions is that it isn't helpful to tell
such statements without even trying to narrow it down to its reason.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-04-19  8:18 ` ktietz at gcc dot gnu.org
@ 2013-04-19 14:26 ` jojelino at gmail dot com
  2013-04-19 18:18 ` davek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jojelino at gmail dot com @ 2013-04-19 14:26 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from gee <jojelino at gmail dot com> 2013-04-19 14:26:15 UTC ---
Created attachment 29904
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29904
Patch for supporting cygwin32's SYSV_ABI proper - Fixed a hunk fail

(In reply to comment #7)
> At what place it freezes?  Can you provide a testcase?  Are you sure it is
> really related to the patch?  What makes you think that?
> 
> All in all, what I mean about those questions is that it isn't helpful to tell
> such statements without even trying to narrow it down to its reason.

The attachment 29898 fixed the problem.
there is a hunk failure so I uploaded another attachment that workarounds the
failure.
Thanks!


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-04-19 14:26 ` jojelino at gmail dot com
@ 2013-04-19 18:18 ` davek at gcc dot gnu.org
  2013-04-21 10:12 ` alexpux at gmail dot com
  2013-05-13 19:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2013-04-19 18:18 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Dave Korn <davek at gcc dot gnu.org> 2013-04-19 18:18:19 UTC ---
Kai's patch applied cleanly for me vs. Revision: 197992 and allowed my failed
build to proceed as far as stage 3 where it failed on libjava (known issue). 
I'm going to rerun the build from clean and try some tests.


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-04-19 18:18 ` davek at gcc dot gnu.org
@ 2013-04-21 10:12 ` alexpux at gmail dot com
  2013-05-13 19:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: alexpux at gmail dot com @ 2013-04-21 10:12 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Alexey Pavlov <alexpux at gmail dot com> 2013-04-21 10:12:35 UTC ---
When building GCC stage2 when building with bootstrap or when building GCC with
prebuilded GCC-4.8.0 without bootstrap I have error configuring libgcc:

configure:3378: /work/build32/gcc48/./gcc/xgcc -B/work/build32/gcc48/./gcc/
-B/usr/i686-pc-cygwin/bin/ -B/usr/i686-pc-cygwin/lib/ -isystem
/usr/i686-pc-cygwin/include -isystem /usr/i686-pc-cygwin/sys-include    -o
conftest -g -O2   conftest.c  >&5

Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<emutls> <whole-program>Assembling functions:

Execution times (seconds)
 phase setup             :   0.01 (100%) usr   0.00 ( 0%) sys   0.02 (100%)
wall     517 kB (89%) ggc
 TOTAL                 :   0.01             0.00             0.02              
 581 kB
xgcc: error: spawn: No such file or directory
configure:3381: $? = 0
configure:3410: checking for C compiler default output file name
configure:3432: /work/build32/gcc48/./gcc/xgcc -B/work/build32/gcc48/./gcc/
-B/usr/i686-pc-cygwin/bin/ -B/usr/i686-pc-cygwin/lib/ -isystem
/usr/i686-pc-cygwin/include -isystem /usr/i686-pc-cygwin/sys-include    -g -O2 
 conftest.c  >&5

Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<emutls> <whole-program>Assembling functions:

Execution times (seconds)
 TOTAL                 :   0.00             0.00             0.00              
 581 kB
xgcc: error: spawn: No such file or directory
configure:3436: $? = 0


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

* [Bug target/56975] [regression] dllimport broken on i686-pc-cygwin
  2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2013-04-21 10:12 ` alexpux at gmail dot com
@ 2013-05-13 19:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-05-13 19:52 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2013-05-13 19:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-16  8:00 [Bug target/56975] New: [regression] dllimport broken on i686-pc-cygwin davek at gcc dot gnu.org
2013-04-16  9:37 ` [Bug target/56975] " ktietz at gcc dot gnu.org
2013-04-17  2:31 ` alexpux at gmail dot com
2013-04-18 15:58 ` jojelino at gmail dot com
2013-04-18 18:19 ` ktietz at gcc dot gnu.org
2013-04-19  4:56 ` alexpux at gmail dot com
2013-04-19  8:18 ` ktietz at gcc dot gnu.org
2013-04-19 14:26 ` jojelino at gmail dot com
2013-04-19 18:18 ` davek at gcc dot gnu.org
2013-04-21 10:12 ` alexpux at gmail dot com
2013-05-13 19:52 ` ktietz at gcc dot gnu.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).