From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16837 invoked by alias); 27 Nov 2013 13:20:30 -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 16804 invoked by uid 48); 27 Nov 2013 13:20:27 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59309] FAIL: c-c++-common/cilk-plus/CK/spawnee_inline.c -g -fcilkplus (test for excess errors) Date: Wed, 27 Nov 2013 13:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools 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: cc Message-ID: In-Reply-To: References: 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: 2013-11/txt/msg02791.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59309 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bviyer at gmail dot com --- Comment #2 from H.J. Lu --- There are /* This should give the number of parameters. */ total_args = list_length (new_args); arg_array = XNEWVEC (tree, total_args); ii_args = new_args; for (ii = 0; ii < total_args; ii++) { arg_array[ii] = TREE_VALUE (ii_args); ii_args = TREE_CHAIN (ii_args); } TREE_USED (function) = 1; rest_of_decl_compilation (function, 0, 0); call1 = cilk_call_setjmp (cfun->cilk_frame_decl); if (*arg_array == NULL_TREE) call2 = build_call_expr (function, 0); else call2 = build_call_expr_loc_array (EXPR_LOCATION (*spawn_p), function, total_args, arg_array); When total_args == 0, XNEWVEC (tree, total_args) doesn't return NULL and "*arg_array" will be wrong.