GCC 4.8.1 cilk plus branch: ternary/conditional operator: internal compiler error

GCC 4.8.1 cilk plus branch: ternary/conditional operator: internal compiler error

I'm using  gcc (GCC) 4.8.1 20130520 (prerelease), pre-compiled version from cilkplus.org.

For something like

c[0:4] = c[0:4] < 0.0 ? 0.0 : c[0:4];

I get the following error:

vec.c:10:5: internal compiler error: in gimplify_expr, at gimplify.c:7934
     c[0:4] = c[0:4] < 0.0 ? 0.0 : c[0:4];
     ^
0x6c7ced gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:7934
0x6cbf5f gimplify_modify_expr
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:4949
0x6c7045 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:7254
0x6c8976 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:5772
0x6c69a3 gimplify_statement_list
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:1568
0x6c69a3 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:7643
0x6c8976 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:5772
0x6c9042 gimplify_bind_expr
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:1254
0x6c7244 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool (*)(tree_node*), int)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:7425
0x6c8976 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:5772
0x6ce072 gimplify_body(tree_node*, bool)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:8322
0x6ce2b7 gimplify_function_tree(tree_node*)
        ../../cilkplus-4_8-branch-gcc/gcc/gimplify.c:8464
0x5d1e5f cgraph_analyze_function
        ../../cilkplus-4_8-branch-gcc/gcc/cgraphunit.c:677
0x5d3697 cgraph_analyze_functions
        ../../cilkplus-4_8-branch-gcc/gcc/cgraphunit.c:986
0x5d4545 finalize_compilation_unit()
        ../../cilkplus-4_8-branch-gcc/gcc/cgraphunit.c:2140
0x4fb6a3 c_write_global_declarations()
        ../../cilkplus-4_8-branch-gcc/gcc/c/c-decl.c:10126

(icc (14.0.1) compiles such code without a problem).

As cilk plus seems to be officially included in gcc, am I supposed to file a bug report at gcc.gnu.org?

Best regards!

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Jens,

      If you are just using array notation, can you please try using the gcc trunk?

You have to build it from source and here are the steps to do it. Please let me know if you have issues.

  1. Fetch the source for the GCC compilers:

      1. Using SVN: To download the sources using SVN from this branch, use the following command:

         
        svn co http://gcc.gnu.org/svn/gcc/trunk trunk-gcc
         

      2. Using GIT: To download the sources using GIT from this branch, use the following commands:

         
        git clone http://gcc.gnu.org/git/gcc.git trunk-gcc
        cd trunk-gcc
        git checkout -b my_branch origin/master
        cd .. 

    The compiler sources for the branch of your choice should now be in the directory $HOME/trunk-gcc.

  2. cd into your trunk-gcc directory and execute the following command to fetch the prerequisite libraries:

    ./contrib/download_prerequisites

  3. Create a new directory called "b-gcc" under $HOME/ . This directory will hold all the object files. You may delete this directory after building the compiler.

  4. Go to the b-gcc directory and type the following command to configure the compiler makefiles to set the install directory to be $HOME/trunk-install and build just the C and C++ compilers:

    $HOME/trunk-gcc/configure --prefix=$HOME/trunk-install --enable-languages="c,c++"

  5. Type make in the same directory. This command will build the compiler sources and will probably take quite a while.

  6. Type make install. This command will copy the compiler executables and the required libraries to the install directory.

Thanks,

Balaji V. Iyer.

Login to leave a comment.