public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59759] internal compiler error: in unify, using std::enable_if on classes Date: Fri, 26 Sep 2014 15:02:00 -0000 [thread overview] Message-ID: <bug-59759-4-NUJtKRBKBm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59759-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59759 Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-09-26 CC| |trippels at gcc dot gnu.org Target Milestone|--- |4.8.4 Ever confirmed|0 |1 Known to fail| |4.8.3, 4.9.1, 5.0 --- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- markus@x4 tmp % cat test3.ii namespace std { template <typename _Tp> struct B { static constexpr _Tp value = 0; }; typedef B<int> false_type; struct C : false_type {}; template <typename> struct is_integral : C {}; template <int, typename _Tp> struct enable_if { typedef _Tp type; }; } enum class enabled; constexpr enabled dummy{}; template <typename T, typename std::enable_if<std::is_integral<T>::value, enabled>::type = dummy> class A; template <typename T> void f(A<T>*) { A<int>* map; f(map); } markus@x4 tmp % g++ -c -std=c++11 test3.ii test3.ii: In substitution of ‘template<class T> void f(A<T>*) [with T = <missing>]’: test3.ii:23:8: required from here test3.ii:23:8: internal compiler error: in unify, at cp/pt.c:18392 f(map); ^ 0x606105 unify ../../gcc/gcc/cp/pt.c:18392 0x6067a4 unify ../../gcc/gcc/cp/pt.c:18234 0x51d9b8 try_class_unification ../../gcc/gcc/cp/pt.c:17248 0x605b77 unify ../../gcc/gcc/cp/pt.c:18271 0x605d5c unify ../../gcc/gcc/cp/pt.c:18138 0x6093f4 unify_one_argument ../../gcc/gcc/cp/pt.c:16657 0x60baea type_unification_real ../../gcc/gcc/cp/pt.c:16728 0x614aac fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:16164 0x5843e9 add_template_candidate_real ../../gcc/gcc/cp/call.c:3025 0x584e5c add_template_candidate ../../gcc/gcc/cp/call.c:3122 0x584e5c add_candidates ../../gcc/gcc/cp/call.c:5253 0x587413 perform_overload_resolution ../../gcc/gcc/cp/call.c:3971 0x5897da build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) ../../gcc/gcc/cp/call.c:4048 0x7032ac finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2366 0x688c55 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6232 0x68bb09 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7293 0x68c744 cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8035 0x68ccd9 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8278 0x68f4c4 cp_parser_expression ../../gcc/gcc/cp/parser.c:8440 0x68fcfc cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9828 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. >From gcc-bugs-return-462645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 26 15:27:02 2014 Return-Path: <gcc-bugs-return-462645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15861 invoked by alias); 26 Sep 2014 15:27:01 -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 15763 invoked by uid 48); 26 Sep 2014 15:26:54 -0000 From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63375] [4.8/4.9/5 Regression] reordering of reads across fences Date: Fri, 26 Sep 2014 15:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm 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.8.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-63375-4-6h11iZxzRS@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-63375-4@http.gcc.gnu.org/bugzilla/> References: <bug-63375-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-09/txt/msg02479.txt.bz2 Content-length: 959 https://gcc.gnu.org/bugzilla/show_bug.cgi?idc375 --- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> --- SRA is indeed quite guilty, the following patch fixes it: diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 8259dba..fb24114 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1064,6 +1064,11 @@ build_access_from_expr_1 (tree expr, gimple stmt, bool write) "component."); return NULL; } + if (TREE_THIS_VOLATILE (expr)) + { + disqualify_base_of_expr (expr, "part of a volatile reference."); + return NULL; + } switch (TREE_CODE (expr)) { Nevertheless, it is apparently not the only culprit. Even on trunk with -fno-tree-sra we produce exactly the same assembly output. From a brief look at the dumps it seems that RTL fwprop1 is the pass moving the load, however I have not had a look if it is its fault or if expansion looses the volatility information somehow.
next prev parent reply other threads:[~2014-09-26 15:02 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-10 16:21 [Bug c++/59759] New: " gereon.kremer at cs dot rwth-aachen.de 2014-01-10 16:21 ` [Bug c++/59759] " gereon.kremer at cs dot rwth-aachen.de 2014-01-10 16:36 ` mpolacek at gcc dot gnu.org 2014-01-10 16:43 ` gereon.kremer at cs dot rwth-aachen.de 2014-01-15 10:30 ` gereon.kremer at cs dot rwth-aachen.de 2014-04-10 14:55 ` paolo.carlini at oracle dot com 2014-09-26 14:40 ` gereon.kremer at cs dot rwth-aachen.de 2014-09-26 15:02 ` trippels at gcc dot gnu.org [this message] 2014-09-30 13:26 ` trippels at gcc dot gnu.org 2014-11-26 15:09 ` gereon.kremer at cs dot rwth-aachen.de 2014-11-26 15:13 ` trippels at gcc dot gnu.org 2014-12-22 20:57 ` ktietz at gcc dot gnu.org 2015-05-26 11:44 ` gereon.kremer at cs dot rwth-aachen.de 2015-05-26 12:07 ` ktietz at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59759-4-NUJtKRBKBm@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).