public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/60325] New: ICE in ipa_modify_formal_parameters, at ipa-prop.c compiling g++.dg/cilk-plus/CK/lambda_spawns.cc with LTO-profiledbootstrap build
Date: Sun, 23 Feb 2014 22:13:00 -0000	[thread overview]
Message-ID: <bug-60325-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 60325
           Summary: ICE in ipa_modify_formal_parameters, at ipa-prop.c
                    compiling g++.dg/cilk-plus/CK/lambda_spawns.cc with
                    LTO-profiledbootstrap build
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com

Created attachment 32205
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32205&action=edit
Preprocessed source

When configured --with-build-config=bootstrap-lto, gcc version 4.9.0 20140223
ICEs a couple of cilk-plus c++ testcases, bith 32bit and 64bit
x86_64-pc-linux-gnu targets:

FAIL: g++.dg/cilk-plus/CK/lambda_spawns.cc  -O3 -fcilkplus (internal compiler
error)
FAIL: g++.dg/cilk-plus/CK/lambda_spawns.cc  -O3 -fcilkplus (test for excess
errors)
UNRESOLVED: g++.dg/cilk-plus/CK/lambda_spawns.cc  -O3 -fcilkplus compilation
failed to produce executable
FAIL: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -O3 -fcilkplus (internal
compiler error)
FAIL: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -O3 -fcilkplus (test for
excess errors)
UNRESOLVED: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -O3 -fcilkplus
compilation failed to produce executable
FAIL: g++.dg/cilk-plus/CK/lambda_spawns.cc  -g -O2 -fcilkplus (internal
compiler error)
FAIL: g++.dg/cilk-plus/CK/lambda_spawns.cc  -g -O2 -fcilkplus (test for excess
errors)
UNRESOLVED: g++.dg/cilk-plus/CK/lambda_spawns.cc  -g -O2 -fcilkplus compilation
failed to produce executable
FAIL: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -g -O2 -fcilkplus (internal
compiler error)
FAIL: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -g -O2 -fcilkplus (test for
excess errors)
UNRESOLVED: g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc  -g -O2 -fcilkplus
compilation failed to produce executable

$ /ssd/uros/gcc-build-profiled/gcc/cc1plus -std=c++11 -fcilkplus -O2 -quiet
lambda_spawns.ii

lambda_spawns.cc: In function ‘<built-in>’:
lambda_spawns.cc:236:1: internal compiler error: in
ipa_modify_formal_parameters, at ipa-prop.c:3516
0x9f4bc8 ipa_modify_formal_parameters(tree_node*, vec<ipa_parm_adjustment,
va_heap, vl_ptr>)
        /home/uros/gcc-svn/trunk/gcc/ipa-prop.c:3516
0x114f0b7 modify_function
        /home/uros/gcc-svn/trunk/gcc/tree-sra.c:4861
0x114f0b7 ipa_early_sra
        /home/uros/gcc-svn/trunk/gcc/tree-sra.c:5009
0x114f0b7 (anonymous namespace)::pass_early_ipa_sra::execute() [clone
.lto_priv.1931]
        /home/uros/gcc-svn/trunk/gcc/tree-sra.c:5065
Please submit a full bug report,
...


#2  0x00000000009f4bc9 in ipa_modify_formal_parameters(tree_node*,
vec<ipa_parm_adjustment, va_heap, vl_ptr>) (fndecl=0x7ffff170b400,
adjustments=...)
    at /home/uros/gcc-svn/trunk/gcc/ipa-prop.c:3516
#3  0x000000000114f0b8 in modify_function (adjustments=..., node=<optimized
out>) at /home/uros/gcc-svn/trunk/gcc/tree-sra.c:4861
#4  ipa_early_sra () at /home/uros/gcc-svn/trunk/gcc/tree-sra.c:5009
#5  (anonymous namespace)::pass_early_ipa_sra::execute() [clone .lto_priv.1931]
() at /home/uros/gcc-svn/trunk/gcc/tree-sra.c:5065
#6  0x0000000000e025bb in execute_one_pass(opt_pass*) () at
/home/uros/gcc-svn/trunk/gcc/passes.c:2229
#7  0x0000000000ebc2fb in execute_pass_list (pass=0x1db9d60) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2282
#8  execute_pass_list(opt_pass*) () at
/home/uros/gcc-svn/trunk/gcc/passes.c:2283
#9  0x0000000000e2a7dd in do_per_function_toporder(void (*)(void*), void*) ()
at /home/uros/gcc-svn/trunk/gcc/passes.c:1630
#10 0x0000000000e0131c in execute_ipa_pass_list(opt_pass*) () at
/home/uros/gcc-svn/trunk/gcc/passes.c:2613

(gdb) list
3511        {
3512          last_parm_void = (TREE_VALUE (tree_last (old_arg_types))
3513                            == void_type_node);
3514          otypes = ipa_get_vector_of_formal_parm_types (orig_type);
3515          if (last_parm_void)
3516            gcc_assert (oparms.length () + 1 == otypes.length ());
3517          else
3518            gcc_assert (oparms.length () == otypes.length ());
3519        }
3520      else

Please note, that the compiler is built with "gmake profiledbootstrap".
>From gcc-bugs-return-444660-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 24 03:52:48 2014
Return-Path: <gcc-bugs-return-444660-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5330 invoked by alias); 24 Feb 2014 03:52:47 -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 5312 invoked by uid 48); 24 Feb 2014 03:52:43 -0000
From: "kristian.spangsege at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/60326] New: Incorrect type from std::make_unsigned<wchar_t>
Date: Mon, 24 Feb 2014 03:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kristian.spangsege at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60326-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-02/txt/msg02417.txt.bz2
Content-length: 1002

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`326

            Bug ID: 60326
           Summary: Incorrect type from std::make_unsigned<wchar_t>
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kristian.spangsege at gmail dot com

The `std::make_signed` and `std::make_unsigned` templates appear to be
incorrectly implemented in GCC 4.8.1.

In particular, both `std::make_signed<wchar_t>::type` and
`std::make_unsigned<wchar_t>::type` produces the type `wchar_t`.

I don't claim to know what the right behaviour is, but it seems wrong, what is
currently done.

Clang 3.4 with `libc++` does this on x86_64:

std::make_unsigned<wchar_t>::type --> int
std::make_unsigned<wchar_t>::type --> unsigned

which seems more reasonable.

The most relevant section in the C++11 standard appears to be 20.9.7.3
[meta.trans.sign].


             reply	other threads:[~2014-02-23 22:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 22:13 ubizjak at gmail dot com [this message]
2014-02-24  8:31 ` [Bug ipa/60325] [4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-09 21:54 ` ubizjak at gmail dot com
2014-03-18 11:13 ` jakub at gcc dot gnu.org
2014-03-18 11:19 ` ubizjak at gmail dot com

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-60325-4@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: link
Be 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).