public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60854] New: inline constructor of extern template
@ 2014-04-15 21:21 joachim.schoeberl at tuwien dot ac.at
2014-04-16 8:32 ` [Bug ipa/60854] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: joachim.schoeberl at tuwien dot ac.at @ 2014-04-15 21:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
Bug ID: 60854
Summary: inline constructor of extern template
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: joachim.schoeberl at tuwien dot ac.at
Created attachment 32610
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32610&action=edit
source file
this code was accepted by gcc-4.8 up to (at least) gcc-4.9-20140323, but g++
(GCC) 4.9.0 20140411 (prerelease) complains.
compiled with
g++ -c -O2 --std=c++11 test.cpp
error message of gcc-4.9.0 prerelease:
test.cpp: In function ‘void Func()’:
test.cpp:5:46: error: inlining failed in call to always_inline
‘MyClass<T>::MyClass() [with T = double]’: function body not available
__attribute__ ((__always_inline__)) inline MyClass () { ; }
^
test.cpp:12:19: error: called from here
MyClass<double> x;
^
>From gcc-bugs-return-449117-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 15 21:32:16 2014
Return-Path: <gcc-bugs-return-449117-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3574 invoked by alias); 15 Apr 2014 21:32: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 3526 invoked by uid 48); 15 Apr 2014 21:32:13 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/60830] [4.9 Regression] ICE on bootstrapping on cygwin
Date: Tue, 15 Apr 2014 21:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: WAITING
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-60830-4-3GuC0blUjr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60830-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60830-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-04/txt/msg01137.txt.bz2
Content-length: 652
http://gcc.gnu.org/bugzilla/show_bug.cgi?id`830
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot de
--- Comment #23 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
FYI: I have 32-bit cygwin 1.7.28-2/XP SP2 here, and the following configuration
builds successfully:
../gcc-4.9.0-RC-20140411/configure --prefix=/<full-path-to-install>
--enable-languages=c,c++
gmp etc. in-tree with: contrib/download_prerequisites
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9/4.10 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
@ 2014-04-16 8:32 ` rguenth at gcc dot gnu.org
2014-04-16 21:06 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-16 8:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-04-16
CC| |hubicka at gcc dot gnu.org
Component|c++ |ipa
Target Milestone|--- |4.9.1
Summary|inline constructor of |[4.9/4.10 Regression]
|extern template |inline constructor of
| |extern template
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Not sure how the C++ 'extern template' explicit instantiation interacts with
the GCC always-inline extension. But with always-inline it is an _error_
to have a function not inlined and thus we omit the body of the function.
Somehow early inlining doesn't see that MyClass::MyClass is always-inline,
this works in 4.8 and the constructor is always-inlined.
Honza?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9/4.10 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
2014-04-16 8:32 ` [Bug ipa/60854] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
@ 2014-04-16 21:06 ` hubicka at gcc dot gnu.org
2014-04-17 2:23 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-04-16 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, the problem is that we see the reference to alias and decide to keep the
alias for future inlining. But when processing the refernce from alias to
function itself, we throw it away. We need to keep the body, too ;)
(the existing node->alias check actually cares about oposite case where we want
to keep weakrefs)
Index: ipa.c
===================================================================
--- ipa.c (revision 209435)
+++ ipa.c (working copy)
@@ -138,7 +138,7 @@ process_references (struct ipa_ref_list
symtab_node *node = ref->referred;
if (node->definition && !node->in_other_partition
- && ((!DECL_EXTERNAL (node->decl) || node->alias)
+ && ((!DECL_EXTERNAL (node->decl) || node->alias || ref->use ==
IPA_REF_ALIAS)
|| (((before_inlining_p
&& (cgraph_state < CGRAPH_STATE_IPA_SSA
|| !lookup_attribute ("always_inline",
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9/4.10 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
2014-04-16 8:32 ` [Bug ipa/60854] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
2014-04-16 21:06 ` hubicka at gcc dot gnu.org
@ 2014-04-17 2:23 ` hubicka at gcc dot gnu.org
2014-04-17 8:10 ` [Bug ipa/60854] [4.9 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-04-17 2:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Thu Apr 17 02:22:57 2014
New Revision: 209459
URL: http://gcc.gnu.org/viewcvs?rev=209459&root=gcc&view=rev
Log:
PR ipa/60854
* ipa.c (symtab_remove_unreachable_nodes): Mark targets of
external aliases alive, too.
* g++.dg/torture/pr60854.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr60854.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
` (2 preceding siblings ...)
2014-04-17 2:23 ` hubicka at gcc dot gnu.org
@ 2014-04-17 8:10 ` rguenth at gcc dot gnu.org
2014-05-17 22:19 ` hubicka at gcc dot gnu.org
2014-06-26 13:01 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-17 8:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.10.0
Summary|[4.9/4.10 Regression] |[4.9 Regression] inline
|inline constructor of |constructor of extern
|extern template |template
Known to fail| |4.9.0
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
` (3 preceding siblings ...)
2014-04-17 8:10 ` [Bug ipa/60854] [4.9 " rguenth at gcc dot gnu.org
@ 2014-05-17 22:19 ` hubicka at gcc dot gnu.org
2014-06-26 13:01 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-05-17 22:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Sat May 17 22:18:25 2014
New Revision: 210563
URL: http://gcc.gnu.org/viewcvs?rev=210563&root=gcc&view=rev
Log:
PR ipa/60854
* ipa.c (symtab_remove_unreachable_nodes): Mark targets of
external aliases alive, too.
* g++.dg/torture/pr60854.C: New testcase.
Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/torture/pr60854.C
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/ipa.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/60854] [4.9 Regression] inline constructor of extern template
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
` (4 preceding siblings ...)
2014-05-17 22:19 ` hubicka at gcc dot gnu.org
@ 2014-06-26 13:01 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-26 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-26 13:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 21:21 [Bug c++/60854] New: inline constructor of extern template joachim.schoeberl at tuwien dot ac.at
2014-04-16 8:32 ` [Bug ipa/60854] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
2014-04-16 21:06 ` hubicka at gcc dot gnu.org
2014-04-17 2:23 ` hubicka at gcc dot gnu.org
2014-04-17 8:10 ` [Bug ipa/60854] [4.9 " rguenth at gcc dot gnu.org
2014-05-17 22:19 ` hubicka at gcc dot gnu.org
2014-06-26 13:01 ` rguenth 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).