public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function
@ 2014-02-14 15:35 reichelt at gcc dot gnu.org
  2014-02-14 15:36 ` [Bug c++/60198] " reichelt at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 15:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

            Bug ID: 60198
           Summary: ICE with _Cilk_spawn in expression within template
                    function
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid(?) code snippet (compiled with "-fcilkplus") triggers
an ICE on trunk:

===========================================
template<typename T> int foo()
{
  int i = (_Cilk_spawn foo<T>()) + 0;
  return i;
}

template int foo<int>();
===========================================

bug.cc: In instantiation of 'int foo() [with T = int]':
bug.cc:7:23:   required from here
bug.cc:3:31: internal compiler error: in tsubst_copy, at cp/pt.c:12887
   int i = (_Cilk_spawn foo<T>()) + 0;
                               ^
0x62a933 tsubst_copy
        ../../gcc/gcc/cp/pt.c:12887
0x607956 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:15110
0x608fda tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14188
0x6115c6 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13812
0x61435d tsubst_expr
        ../../gcc/gcc/cp/pt.c:13327
0x611093 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13219
0x61208c tsubst_expr
        ../../gcc/gcc/cp/pt.c:13424
0x60f2a9 instantiate_decl(tree_node*, int, bool)
        ../../gcc/gcc/cp/pt.c:19690
0x64d8c7 instantiate_pending_templates(int)
        ../../gcc/gcc/cp/pt.c:19806
0x688bed cp_write_global_declarations()
        ../../gcc/gcc/cp/decl2.c:4148
Please submit a full bug report, [etc.]


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
@ 2014-02-14 15:36 ` reichelt at gcc dot gnu.org
  2014-02-18 10:14 ` slayoo at staszic dot waw.pl
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 15:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |bviyer at gcc dot gnu.org
      Known to fail|                            |4.9.0

--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Balaji, this is your domain, would you mind having a look?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
  2014-02-14 15:36 ` [Bug c++/60198] " reichelt at gcc dot gnu.org
@ 2014-02-18 10:14 ` slayoo at staszic dot waw.pl
  2014-02-18 14:20 ` bviyer at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-02-18 10:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

Sylwester Arabas <slayoo at staszic dot waw.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slayoo at staszic dot waw.pl

--- Comment #2 from Sylwester Arabas <slayoo at staszic dot waw.pl> ---
Hi,

I've just got the same error with current Debian's gcc-snapshot (20140212) when
trying to compile a code that uses the Blitz++ library, and after replacing all
"#pragma ivdep" with "#pragma GCC ivdep" in that library...

    /usr/include/blitz/globeval.cc:466:12: internal compiler error: in
tsubst_copy, at cp/pt.c:12887
           for (; i < uneven_start; ++i)
                ^
    Please submit a full bug report,
    with preprocessed source if appropriate.

I can provide more details if needed.

HTH,
Sylwester


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
  2014-02-14 15:36 ` [Bug c++/60198] " reichelt at gcc dot gnu.org
  2014-02-18 10:14 ` slayoo at staszic dot waw.pl
@ 2014-02-18 14:20 ` bviyer at gmail dot com
  2014-02-18 23:00 ` slayoo at staszic dot waw.pl
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bviyer at gmail dot com @ 2014-02-18 14:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

Balaji V. Iyer <bviyer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bviyer at gmail dot com

--- Comment #3 from Balaji V. Iyer <bviyer at gmail dot com> ---
(In reply to Sylwester Arabas from comment #2)
> Hi,
> 
> I've just got the same error with current Debian's gcc-snapshot (20140212)
> when trying to compile a code that uses the Blitz++ library, and after
> replacing all "#pragma ivdep" with "#pragma GCC ivdep" in that library...
> 
>     /usr/include/blitz/globeval.cc:466:12: internal compiler error: in
> tsubst_copy, at cp/pt.c:12887
>            for (; i < uneven_start; ++i)
>                 ^
>     Please submit a full bug report,
>     with preprocessed source if appropriate.
> 
> I can provide more details if needed.

Hi Sylwester,
    The issue with #pragma ivdep is not relevant for this bug. Can you please
open another bug report for that and discuss it there?

Thanks,

Balaji V. Iyer.


> 
> HTH,
> Sylwester


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-02-18 14:20 ` bviyer at gmail dot com
@ 2014-02-18 23:00 ` slayoo at staszic dot waw.pl
  2015-02-10  6:22 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-02-18 23:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

--- Comment #4 from Sylwester Arabas <slayoo at staszic dot waw.pl> ---
Here it is:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60267

HTH,
Sylwester


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-02-18 23:00 ` slayoo at staszic dot waw.pl
@ 2015-02-10  6:22 ` pinskia at gcc dot gnu.org
  2015-02-10  6:38 ` pinskia at gcc dot gnu.org
  2015-05-01  8:37 ` hvdieren at elis dot ugent.be
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-10  6:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-10
     Ever confirmed|0                           |1

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-02-10  6:22 ` pinskia at gcc dot gnu.org
@ 2015-02-10  6:38 ` pinskia at gcc dot gnu.org
  2015-05-01  8:37 ` hvdieren at elis dot ugent.be
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-10  6:38 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tau at eidos dot ic.i.u-tokyo.ac.j
                   |                            |p

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 61286 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/60198] ICE with _Cilk_spawn in expression within template function
  2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-02-10  6:38 ` pinskia at gcc dot gnu.org
@ 2015-05-01  8:37 ` hvdieren at elis dot ugent.be
  6 siblings, 0 replies; 8+ messages in thread
From: hvdieren at elis dot ugent.be @ 2015-05-01  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

Hans Vandierendonck <hvdieren at elis dot ugent.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hvdieren at elis dot ugent.be

--- Comment #7 from Hans Vandierendonck <hvdieren at elis dot ugent.be> ---
The following code snippet
===========================================
template<typename T> int foo()
{
  int i = (_Cilk_spawn foo<T>()) + 0;
  return i;
}

template int foo<int>();
===========================================

is invalid. You are not allowed to use the result of a spawned function until
after a _Cilk_sync; statement.

But that is no excuse for an ICE.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-01  8:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 15:35 [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function reichelt at gcc dot gnu.org
2014-02-14 15:36 ` [Bug c++/60198] " reichelt at gcc dot gnu.org
2014-02-18 10:14 ` slayoo at staszic dot waw.pl
2014-02-18 14:20 ` bviyer at gmail dot com
2014-02-18 23:00 ` slayoo at staszic dot waw.pl
2015-02-10  6:22 ` pinskia at gcc dot gnu.org
2015-02-10  6:38 ` pinskia at gcc dot gnu.org
2015-05-01  8:37 ` hvdieren at elis dot ugent.be

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).