From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13596 invoked by alias); 29 Jan 2014 14:41:26 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13570 invoked by uid 48); 29 Jan 2014 14:41:23 -0000 From: "evstupac at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/59984] New: OpenMP and Cilk Plus SIMD pragma makes loop incorrect Date: Wed, 29 Jan 2014 14:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: evstupac 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: 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-01/txt/msg03042.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59984 Bug ID: 59984 Summary: OpenMP and Cilk Plus SIMD pragma makes loop incorrect Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: evstupac at gmail dot com GCC generates incorrect code for the SIMD loop (#pragma [omp] simd) with function call that have pointer parameters. (test case attached) gcc test.c foo.c -fcilkplus -O3 ./a.out ; echo $? 1 gcc test.c foo.c -fcilkplus -O0 ./a.out ; echo $? 0 the same for -fopenmp -DENABLE_OMP instead of -fcilkplus Moreover g++ crashes on the test: g++ test.c -fcilkplus -O3 -c test.c: In function 'int main()': test.c:10:5: error: dead STMT in EH table int main() ^ # .MEM_11 = VDEF <.MEM_39> foo (_10, &v1, &v2); test.c:10:5: internal compiler error: verify_gimple failed 0xb774b3 verify_gimple_in_cfg(function*) /export/users/mstester/stability/svn/trunk/gcc/tree-cfg.c:4853 0xa9fc52 execute_function_todo /export/users/mstester/stability/svn/trunk/gcc/passes.c:1853 0xaa05a3 execute_todo /export/users/mstester/stability/svn/trunk/gcc/passes.c:1887 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.