public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized)
@ 2012-06-14 15:56 jjhforrest at gmail dot com
2012-06-14 16:56 ` [Bug c++/53672] " bviyer at gmail dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-14 15:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
Bug #: 53672
Summary: gcc/branches/cilkplus does not like C++ spawn (when
optimized)
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jjhforrest@gmail.com
Created attachment 27619
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27619
.ii file created with -save-temp
In real code I get
In function '<built-in>':
cc1plus: internal compiler error: Segmentation fault
With tiny example (segfault.cpp -> segfault.ii) I get
/j/mycilk3/bin/g++ -O2 segfault.ii
segfault.cpp: In function ‘<built-in>’:
segfault.cpp:33:1: internal compiler error: in remap_gimple_op_r, at
tree-inline.c:849
}
^
works at -O1
Output from /j/mycilk3/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/j/mycilk3/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../cilk2/configure --prefix=/j/mycilk3 --libexecdir=/usr/lib
--enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
--disable-multilib --disable-bootstrap --with-system-zlib CFLAGS='-fPIC
-march=x86-64' LD=/usr/bin/ld
Thread model: posix
gcc version 4.8.0 20120522 (experimental) (GCC)
segfault.ii attached
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
@ 2012-06-14 16:56 ` bviyer at gmail dot com
2012-06-14 19:22 ` jjhforrest at gmail dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bviyer at gmail dot com @ 2012-06-14 16:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
Balaji V. Iyer <bviyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bviyer at gmail dot com
--- Comment #1 from Balaji V. Iyer <bviyer at gmail dot com> 2012-06-14 16:56:19 UTC ---
Hello John,
This problem seem to be fixed as of this commit:
git:0ac59c91905a106865589114d4e55f0c7f256874
svn: revision:188147
I tried your code and mine passes fine.
Thanks,
Balaji V. Iyer.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
2012-06-14 16:56 ` [Bug c++/53672] " bviyer at gmail dot com
@ 2012-06-14 19:22 ` jjhforrest at gmail dot com
2012-06-15 6:57 ` jjhforrest at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-14 19:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #2 from John Forrest <jjhforrest at gmail dot com> 2012-06-14 19:22:30 UTC ---
Balaji,
Updated my copy.
My simple version - now works - but real case still doesn't.
Try and give you a .ii file tomorrow.
John
On 14/06/12 17:56, bviyer at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> Balaji V. Iyer<bviyer at gmail dot com> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |bviyer at gmail dot com
>
> --- Comment #1 from Balaji V. Iyer<bviyer at gmail dot com> 2012-06-14 16:56:19 UTC ---
> Hello John,
> This problem seem to be fixed as of this commit:
>
> git:0ac59c91905a106865589114d4e55f0c7f256874
> svn: revision:188147
>
> I tried your code and mine passes fine.
>
> Thanks,
>
> Balaji V. Iyer.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
2012-06-14 16:56 ` [Bug c++/53672] " bviyer at gmail dot com
2012-06-14 19:22 ` jjhforrest at gmail dot com
@ 2012-06-15 6:57 ` jjhforrest at gmail dot com
2012-06-15 19:44 ` bviyer at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-15 6:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #3 from John Forrest <jjhforrest at gmail dot com> 2012-06-15 06:57:43 UTC ---
Balaji,
Attached - AbcMatrix.ii gives segfault using "compile"
There are more than a dozen places in my code where code such as -
> for (int i=0;i<numberBlocks-1;i++)
> which[i]=cilk_spawn pivotColumnDantzig(i,useRowCopy,updates,spare,best[i]);
> which[numberBlocks-1]=pivotColumnDantzig(numberBlocks-1,useRowCopy,updates,
> spare,best[numberBlocks-1]);
> cilk_sync;
>
inside a class such as AbcMatrix segfaults on compilation. If I
create a non class static function doWork(AbcMatrix * matrix, other
stuff) and in that function do
which[i]=cilk_spawn(matrix,other stuff)
it works. There is not much of an overhead but is ugly and time consuming.
Hope you can reproduce fault.
Regards,
John
On 14/06/12 17:56, bviyer at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> Balaji V. Iyer<bviyer at gmail dot com> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |bviyer at gmail dot com
>
> --- Comment #1 from Balaji V. Iyer<bviyer at gmail dot com> 2012-06-14 16:56:19 UTC ---
> Hello John,
> This problem seem to be fixed as of this commit:
>
> git:0ac59c91905a106865589114d4e55f0c7f256874
> svn: revision:188147
>
> I tried your code and mine passes fine.
>
> Thanks,
>
> Balaji V. Iyer.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (2 preceding siblings ...)
2012-06-15 6:57 ` jjhforrest at gmail dot com
@ 2012-06-15 19:44 ` bviyer at gcc dot gnu.org
2012-06-15 19:46 ` bviyer at gmail dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bviyer at gcc dot gnu.org @ 2012-06-15 19:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #4 from bviyer at gcc dot gnu.org 2012-06-15 19:44:04 UTC ---
Author: bviyer
Date: Fri Jun 15 19:43:57 2012
New Revision: 188680
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188680
Log:
This patch fixes bug PR 53672.
2012-06-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* dwarf2out.c (dwarf2out_function_decl): Added a check for spawn helper.
Modified:
branches/cilkplus/gcc/ChangeLog.cilk
branches/cilkplus/gcc/dwarf2out.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (3 preceding siblings ...)
2012-06-15 19:44 ` bviyer at gcc dot gnu.org
@ 2012-06-15 19:46 ` bviyer at gmail dot com
2012-06-16 8:13 ` jjhforrest at gmail dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bviyer at gmail dot com @ 2012-06-15 19:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #5 from Balaji V. Iyer <bviyer at gmail dot com> 2012-06-15 19:46:13 UTC ---
Hello John,
The revision mentioned above should fix this problem.
Thanks,
Balaji V. Iyer.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (4 preceding siblings ...)
2012-06-15 19:46 ` bviyer at gmail dot com
@ 2012-06-16 8:13 ` jjhforrest at gmail dot com
2012-06-16 16:08 ` jjhforrest at gmail dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-16 8:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #6 from John Forrest <jjhforrest at gmail dot com> 2012-06-16 08:13:02 UTC ---
Balaji,
Thanks - seems to fix bug - now I can simplify my coding in various places.
John
On 15/06/12 20:46, bviyer at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> --- Comment #5 from Balaji V. Iyer<bviyer at gmail dot com> 2012-06-15 19:46:13 UTC ---
> Hello John,
> The revision mentioned above should fix this problem.
>
> Thanks,
>
> Balaji V. Iyer.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (5 preceding siblings ...)
2012-06-16 8:13 ` jjhforrest at gmail dot com
@ 2012-06-16 16:08 ` jjhforrest at gmail dot com
2012-06-18 2:08 ` bviyer at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-16 16:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #7 from John Forrest <jjhforrest at gmail dot com> 2012-06-16 16:08:09 UTC ---
Sorry to say that when I was backing out some of my previous
work-arounds I got a segfault again.
John
On 15/06/12 20:46, bviyer at gmail dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> --- Comment #5 from Balaji V. Iyer<bviyer at gmail dot com> 2012-06-15 19:46:13 UTC ---
> Hello John,
> The revision mentioned above should fix this problem.
>
> Thanks,
>
> Balaji V. Iyer.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (6 preceding siblings ...)
2012-06-16 16:08 ` jjhforrest at gmail dot com
@ 2012-06-18 2:08 ` bviyer at gcc dot gnu.org
2012-06-18 9:59 ` jjhforrest at gmail dot com
2012-10-10 19:34 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: bviyer at gcc dot gnu.org @ 2012-06-18 2:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #8 from bviyer at gcc dot gnu.org 2012-06-18 02:08:03 UTC ---
Author: bviyer
Date: Mon Jun 18 02:07:54 2012
New Revision: 188722
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188722
Log:
This patch should fix the 2nd case of PR 53672.
2012-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR 53672
* dwarf2out.c (dwarf2out_abstract_function): Added a check for the
spawn helper.
(dwarf2out_function_decl): Added a check if CILK_FN_P is set when there
is no function struct.
* cilk.c (expand_builtin_cilk_metadata): Set the CILK_FN_P field to 1.
* cilk-spawn.c (cg-hacks): Likewise.
(gimplify_cilk_for_2): Likewise.
(gimplify_cilk_for): Likewise.
* tree.h (CILK_FN_P): Added new #define to access a base field of tree.
Modified:
branches/cilkplus/gcc/ChangeLog.cilk
branches/cilkplus/gcc/cilk-spawn.c
branches/cilkplus/gcc/cilk.c
branches/cilkplus/gcc/cp/ChangeLog.cilk
branches/cilkplus/gcc/cp/cilk.c
branches/cilkplus/gcc/dwarf2out.c
branches/cilkplus/gcc/tree.h
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (7 preceding siblings ...)
2012-06-18 2:08 ` bviyer at gcc dot gnu.org
@ 2012-06-18 9:59 ` jjhforrest at gmail dot com
2012-10-10 19:34 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: jjhforrest at gmail dot com @ 2012-06-18 9:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
--- Comment #9 from John Forrest <jjhforrest at gmail dot com> 2012-06-18 09:59:11 UTC ---
Balaji,
That works and on a few other cases I have altered back.
Hopefully that is that.
Thanks
John
On 18/06/12 03:08, bviyer at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> --- Comment #8 from bviyer at gcc dot gnu.org 2012-06-18 02:08:03 UTC ---
> Author: bviyer
> Date: Mon Jun 18 02:07:54 2012
> New Revision: 188722
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188722
> Log:
> This patch should fix the 2nd case of PR 53672.
> 2012-06-17 Balaji V. Iyer<balaji.v.iyer@intel.com>
>
> PR 53672
> * dwarf2out.c (dwarf2out_abstract_function): Added a check for the
> spawn helper.
> (dwarf2out_function_decl): Added a check if CILK_FN_P is set when there
> is no function struct.
> * cilk.c (expand_builtin_cilk_metadata): Set the CILK_FN_P field to 1.
> * cilk-spawn.c (cg-hacks): Likewise.
> (gimplify_cilk_for_2): Likewise.
> (gimplify_cilk_for): Likewise.
> * tree.h (CILK_FN_P): Added new #define to access a base field of tree.
>
>
> Modified:
> branches/cilkplus/gcc/ChangeLog.cilk
> branches/cilkplus/gcc/cilk-spawn.c
> branches/cilkplus/gcc/cilk.c
> branches/cilkplus/gcc/cp/ChangeLog.cilk
> branches/cilkplus/gcc/cp/cilk.c
> branches/cilkplus/gcc/dwarf2out.c
> branches/cilkplus/gcc/tree.h
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
` (8 preceding siblings ...)
2012-06-18 9:59 ` jjhforrest at gmail dot com
@ 2012-10-10 19:34 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-10 19:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-10 19:34:17 UTC ---
Closing.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-10-10 19:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 15:56 [Bug c++/53672] New: gcc/branches/cilkplus does not like C++ spawn (when optimized) jjhforrest at gmail dot com
2012-06-14 16:56 ` [Bug c++/53672] " bviyer at gmail dot com
2012-06-14 19:22 ` jjhforrest at gmail dot com
2012-06-15 6:57 ` jjhforrest at gmail dot com
2012-06-15 19:44 ` bviyer at gcc dot gnu.org
2012-06-15 19:46 ` bviyer at gmail dot com
2012-06-16 8:13 ` jjhforrest at gmail dot com
2012-06-16 16:08 ` jjhforrest at gmail dot com
2012-06-18 2:08 ` bviyer at gcc dot gnu.org
2012-06-18 9:59 ` jjhforrest at gmail dot com
2012-10-10 19:34 ` paolo.carlini at oracle dot com
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).