[Bug middle-end/65960] New: ICE in Cilk spawn with argument with non-trivial constructor

hvdieren at elis dot ugent.be gcc-bugzilla@gcc.gnu.org
Fri May 1 08:44:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65960

            Bug ID: 65960
           Summary: ICE in Cilk spawn with argument with non-trivial
                    constructor
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hvdieren at elis dot ugent.be
  Target Milestone: ---

This code causes an ICE:

struct non_trivial {
    int x;

    non_trivial( int y ) : x( y ) { }
    non_trivial( const non_trivial & s ) : x( s.x ) { }
    ~non_trivial() { }
};

int foo( non_trivial s );

int func( non_trivial s ) {
    int x = cilk_spawn foo( s );
    int y = 10;
    cilk_sync;
    return y - x;
}



Command line output:
$ g++-4.9.2 -fcilkplus struct.cc -o struct
struct.cc: In function '<built-in>':
struct.cc:28:31: internal compiler error: in lower_stmt, at gimple-low.c:370
     int x = cilk_spawn foo( s );
                               ^
0xddba13 lower_stmt
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:370
0xddba13 lower_sequence
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:206
0xddbb1a lower_try_catch
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:443
0xddbb1a lower_stmt
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:270
0xddbb1a lower_sequence
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:206
0xddb8dc lower_stmt
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:275
0xddb8dc lower_sequence
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:206
0xddb741 lower_gimple_bind
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:415
0xddc5cd lower_function_body
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:118
0xddc5cd execute
        /var/jonny/gcc/objdir/../gcc-4.9.2/gcc/gimple-low.c:184
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.


The tested OS was CentOS 6.6.

For reference Intel icc handles this case correctly.



More information about the Gcc-bugs mailing list