* [Bug middle-end/61207] Win64 gcc 4.9.0: ICE at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
@ 2014-05-17 0:45 ` pinskia at gcc dot gnu.org
2014-05-27 11:25 ` ktietz at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-05-17 0:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |4.9.0
Severity|major |normal
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] Win64 gcc 4.9.0: ICE at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
2014-05-17 0:45 ` [Bug middle-end/61207] " pinskia at gcc dot gnu.org
@ 2014-05-27 11:25 ` ktietz at gcc dot gnu.org
2014-11-20 11:33 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-05-27 11:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-05-27
Ever confirmed|0 |1
--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> ---
ICE happens in in expand_expr_addr_expr_1 because the result is (reg/v:TI 86 [
func ]), which is obviously no memory.
Issue seems here to be that x64 ABI has pre-allocated stack-area on call, so
for the first 4 arguments no stack-allocation is necessary. So we might need
to specialize allocate_stack_slots_for_args-hook for this target.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] Win64 gcc 4.9.0: ICE at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
2014-05-17 0:45 ` [Bug middle-end/61207] " pinskia at gcc dot gnu.org
2014-05-27 11:25 ` ktietz at gcc dot gnu.org
@ 2014-11-20 11:33 ` ktietz at gcc dot gnu.org
2014-11-20 13:45 ` thomas.petazzoni@free-electrons.com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-11-20 11:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Hmm, does it help to specify additional option '-fno-ms-extensions'?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] Win64 gcc 4.9.0: ICE at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (2 preceding siblings ...)
2014-11-20 11:33 ` ktietz at gcc dot gnu.org
@ 2014-11-20 13:45 ` thomas.petazzoni@free-electrons.com
2015-02-08 10:33 ` public at hansmi dot ch
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: thomas.petazzoni@free-electrons.com @ 2014-11-20 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
--- Comment #4 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
(In reply to Kai Tietz from comment #3)
> Hmm, does it help to specify additional option '-fno-ms-extensions'?
No, it doesn't help. In fact in my case, it isn't a -Os problem, but a -O3
problem. I had both the compile command line, with -O3 being last. So in the
end, I tested the following cases:
* -O2 -> builds fine
* -Os -> builds fine
* -O3 -> breaks
* -O3 -fno-ms-extensions -> breaks
If you want to have a look at the code, I've put the pre-processed version of
the file at http://free-electrons.com/~thomas/pub/SVGAllInOne.cpp.xz.
I'm able to reproduce the bug under Ubuntu, using the Ubuntu ARM g++ compiler,
which uses gcc 4.9.1 :
# Default -> OK
thomas@skate:/tmp$ arm-linux-gnueabihf-g++ -c SVGAllInOne.cpp
# -O2 -> OK
thomas@skate:/tmp$ arm-linux-gnueabihf-g++ -O2 -c SVGAllInOne.cpp
# -Os -> OK
thomas@skate:/tmp$ arm-linux-gnueabihf-g++ -Os -c SVGAllInOne.cpp
# -O3 -> NOK
thomas@skate:/tmp$ arm-linux-gnueabihf-g++ -O3 -c SVGAllInOne.cpp
In file included from svg/SVGAnimateMotionElement.cpp:37:0,
from svg/SVGAllInOne.cpp:36:
svg/SVGPathElement.h: In member function ‘virtual WebCore::FloatRect
WebCore::SVGPathElement::_ZTv0_n24_N7WebCore14SVGPathElement7getBBoxENS_12SVGLocatable19StyleUpdateStrategyE(WebCore::SVGLocatable::StyleUpdateStrategy)’:
svg/SVGPathElement.h:95:23: internal compiler error: in
expand_expr_addr_expr_1, at expr.c:7649
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cccMXXZg.out file, please attach this to
your bugreport.
# -O3 -fno-ms-extensions -> NOK
thomas@skate:/tmp$ arm-linux-gnueabihf-g++ -O3 -fno-ms-extensions -c
SVGAllInOne.cpp
In file included from svg/SVGAnimateMotionElement.cpp:37:0,
from svg/SVGAllInOne.cpp:36:
svg/SVGPathElement.h: In member function ‘virtual WebCore::FloatRect
WebCore::SVGPathElement::_ZTv0_n24_N7WebCore14SVGPathElement7getBBoxENS_12SVGLocatable19StyleUpdateStrategyE(WebCore::SVGLocatable::StyleUpdateStrategy)’:
svg/SVGPathElement.h:95:23: internal compiler error: in
expand_expr_addr_expr_1, at expr.c:7649
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
Beware that the C++ source file is 7 MB in size, and takes a little while to
build:
$ time arm-linux-gnueabihf-g++ -O2 -c SVGAllInOne.cpp
real 0m32.544s
user 0m32.032s
sys 0m0.431s
>From gcc-bugs-return-467781-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 20 13:50:28 2014
Return-Path: <gcc-bugs-return-467781-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10571 invoked by alias); 20 Nov 2014 13:50:28 -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 10521 invoked by uid 48); 20 Nov 2014 13:50:25 -0000
From: "dje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/60031] dg-require-effective-target powerpc_vsx_ok is not enough
Date: Thu, 20 Nov 2014 13:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: testsuite
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dje at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-60031-4-xxpJL7qYKy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60031-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60031-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg02253.txt.bz2
Content-length: 475
https://gcc.gnu.org/bugzilla/show_bug.cgi?id`031
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-20
Ever confirmed|0 |1
--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] Win64 gcc 4.9.0: ICE at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (3 preceding siblings ...)
2014-11-20 13:45 ` thomas.petazzoni@free-electrons.com
@ 2015-02-08 10:33 ` public at hansmi dot ch
2015-03-06 17:39 ` [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 " doko at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: public at hansmi dot ch @ 2015-02-08 10:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
M. Hanselmann <public at hansmi dot ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |public at hansmi dot ch
--- Comment #5 from M. Hanselmann <public at hansmi dot ch> ---
This also happens when compiling Boost 1.57.0. I've reproduced it using
TDM64-GCC (version 4.9.2-3) and Stephan T. Lavavej's MinGW distribution
(version 12.2).
How to reproduce:
- Unpack Boost 1.57.0 and change into source directory
- g++ -v -save-temps -Os -I. libs\test\src\unit_test_parameters.cpp
As mentioned in earlier comments, -O{1,2,3} work and only -Os produced an ICE.
I'm not attaching 2.3 MB preprocessed file due to the wide availability of
Boost sources.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (4 preceding siblings ...)
2015-02-08 10:33 ` public at hansmi dot ch
@ 2015-03-06 17:39 ` doko at gcc dot gnu.org
2015-03-07 5:54 ` kugan at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-06 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC| |doko at gcc dot gnu.org
Known to work| |4.8.4, 5.0
Version|4.9.0 |4.9.2
Summary|Win64 gcc 4.9.0: ICE at -Os |[4.9 Regression] Win64 gcc
|compiling some C++ code |4.9.0: ICE in in
| |expand_expr_addr_expr_1 at
| |-Os compiling some C++ code
Known to fail| |4.9.2
--- Comment #6 from Matthias Klose <doko at gcc dot gnu.org> ---
at least on arm-linux-gnueabihf, this is a regression in 4.9 (seen with -Os and
-O3), works on the trunk.
$ g++ -c -O3 moc_workplane.ii
moc_workplane.ii: In member function 'virtual A
C<int>::_ZTv0_n12_NK1CIiE5m_fn1Ev() const':
moc_workplane.ii:8:45: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:7634
template <typename> class C : virtual B { A m_fn1() const; };
^
Please submit a full bug report,
with preprocessed source if appropriate.
$ cat moc_workplane.ii
class A {
float xp;
float yp;
};
class B {
virtual A m_fn1() const;
};
template <typename> class C : virtual B { A m_fn1() const; };
class D : C<int> {
virtual const int *m_fn2() const;
};
template <typename T> A C<T>::m_fn1() const { return A(); }
const int *D::m_fn2() const {}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (5 preceding siblings ...)
2015-03-06 17:39 ` [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 " doko at gcc dot gnu.org
@ 2015-03-07 5:54 ` kugan at gcc dot gnu.org
2015-03-07 11:09 ` mingw.android at gmail dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: kugan at gcc dot gnu.org @ 2015-03-07 5:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
kugan at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kugan at gcc dot gnu.org
--- Comment #7 from kugan at gcc dot gnu.org ---
For the testcase in comment #6, it works if i use -fno-tree-sra.
diff -u6 nok/pr1314.c.022t.forwprop1 nok/pr1314.c.024t.esra
--- nok/pr1314.c.022t.forwprop1 2015-03-07 16:16:43.839799627 +1100
+++ nok/pr1314.c.024t.esra 2015-03-07 16:16:43.839799627 +1100
@@ -25,24 +25,38 @@
}
;; Function virtual A C<int>::_ZTv0_n12_NK1CIiE5m_fn1Ev() const
(_ZTv0_n12_NK1CIiE5m_fn1Ev, funcdef_no=3, decl_uid=4649, symbol_order=12)
+Created a replacement for D.4707 offset: 0, size: 32: SR.6
+Created a replacement for D.4707 offset: 32, size: 32: SR.7
+Removing load: <retval> = D.4707;
+
+Symbols to be put in SSA form
+{ D.4697 D.4708 D.4709 }
+Incremental SSA update started at block: 0
+Number of blocks in CFG: 3
+Number of blocks to update: 2 ( 67%)
+
+
virtual A C<int>::_ZTv0_n12_NK1CIiE5m_fn1Ev() const (const struct C * const
this)
{
+ float SR.7;
+ float SR.6;
struct A D.4707;
const struct C * adjusted_this.3;
int (*<Tdf0>) () vcalloffset.2;
int (*<Tdf0>) () * vtableaddr.1;
int (*<Tdf0>) () * * vptr.0;
struct A <retval>;
<bb 2>:
- D.4707.xp = 0.0;
- D.4707.yp = 0.0;
- <retval> = D.4707;
+ SR.6_12 = 0.0;
+ SR.7_11 = 0.0;
+ MEM[(struct A *)&<retval>] = SR.6_12;
+ MEM[(struct A *)&<retval> + 4B] = SR.7_11;
return <retval>;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (6 preceding siblings ...)
2015-03-07 5:54 ` kugan at gcc dot gnu.org
@ 2015-03-07 11:09 ` mingw.android at gmail dot com
2015-03-07 16:17 ` ktietz at gcc dot gnu.org
2015-03-08 20:40 ` yroux at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: mingw.android at gmail dot com @ 2015-03-07 11:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
Ray Donnelly <mingw.android at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mingw.android at gmail dot com
--- Comment #8 from Ray Donnelly <mingw.android at gmail dot com> ---
Regarding https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207#c5
It's not a question of being able to get the source code, it's about reducing
the code to the minimum amount that exhibits the bug. In the old days (maybe
still now?) gccbug would be used, now-a-days, creduce works well. Here is the
testcase from Boost:
// reduced test case:
namespace std {
class basic_string typedef string;
class basic_string {
public:
basic_string(char *, unsigned);
};
}
class A {
public:
A(char);
size();
char *begin();
*m_begin;
*m_end;
};
enum output_format {};
namespace std {
class runtime_error {
public:
runtime_error(string);
};
}
struct B : std::runtime_error {
B(A m) : runtime_error(std::string(m.begin(), m.size())) {}
};
fn1(int, output_format) {
B(0);
B(0);
}
// elapsed time: 30405 seconds
Compiling with MSYS2's mingw64/mingw-w64-x86_64-gcc 4.9.2-4 package with:
/mingw64/bin/g++ -Os testcase.ii
Gives:
internal compiler error: in expand_expr_addr_expr_1, at expr.c:7669
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (7 preceding siblings ...)
2015-03-07 11:09 ` mingw.android at gmail dot com
@ 2015-03-07 16:17 ` ktietz at gcc dot gnu.org
2015-03-08 20:40 ` yroux at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-03-07 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
--- Comment #9 from Kai Tietz <ktietz at gcc dot gnu.org> ---
well, it might be same issue, but on x64 target the testcase of comment #6
works without issues.
As SRA seems to be involved here, the changes on trunk for DOM might be the
solution.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/61207] [4.9 Regression] Win64 gcc 4.9.0: ICE in in expand_expr_addr_expr_1 at -Os compiling some C++ code
2014-05-17 0:44 [Bug middle-end/61207] New: Win64 gcc 4.9.0: ICE at -Os compiling some C++ code mingw.android at gmail dot com
` (8 preceding siblings ...)
2015-03-07 16:17 ` ktietz at gcc dot gnu.org
@ 2015-03-08 20:40 ` yroux at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: yroux at gcc dot gnu.org @ 2015-03-08 20:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207
Yvan Roux <yroux at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #10 from Yvan Roux <yroux at gcc dot gnu.org> ---
This is a duplicate of PR64896 and was fixed on trunk at r220489.
I've backported and tested on Linaro 4.9 branch and will prepare the backport
on FSF 4.9.
Yvan
*** This bug has been marked as a duplicate of bug 64896 ***
^ permalink raw reply [flat|nested] 11+ messages in thread