public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
@ 2014-02-18 22:59 slayoo at staszic dot waw.pl
  2014-02-18 23:07 ` [Bug c++/60267] " jakub at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-02-18 22:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60267
           Summary: ICE in c_pp_lookup_pragma, at
                    c-family/c-pragma.c:1232; ICE in tsubst_copy, at
                    cp/pt.c:12887
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slayoo at staszic dot waw.pl

Hi All,

The Blitz++ library (http://sf.net/projects/blitz) contains some "#pragma
ivdep" macros intended for the Intel C++ compiler. Having learnt that GCC now
supports a corresponding "GCC ivdep" pragma, I've tried changing all occurances
of pragma ivdep in Blitz++ with the GCC ones (encapsulating them in some
define-checks to detect the compiler). 

Trying then just to parse the include files with:

#define BZ_USE_ALIGNMENT_PRAGMAS  
#include <blitz/array-impl.h>
int main() {}

using the Debian's gcc-snapshot (20140212) I've got an ICE:


**************************************************************************************
In file included from /usr/include/blitz/globeval.cc:34:0,
                 from /usr/include/blitz/array/ops.cc:38,
                 from /usr/include/blitz/array.cc:13,
                 from /usr/include/blitz/array-impl.h:2559,
                 from bug.cpp:2:
/usr/include/blitz/tvevaluate.h: In instantiation of 'static void
blitz::_tv_evaluator<unroll, N_length>::evaluate_aligned(T_numtype*, const
T_expr&, T_update) [with T_numtype = bool; T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<bool> >; T_update =
blitz::_bz_update<bool, bool>; bool unroll = false; int N_length = 1]':
/usr/include/blitz/tvevaluate.h:88:85:   required from 'static void
blitz::_tv_evaluator<unroll,
N_length>::select_evaluation(blitz::TinyVector<T_numtype2, N_length>&, const
T_expr&, T_update) [with T = bool; T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<bool> >; T_update =
blitz::_bz_update<bool, bool>; bool unroll = false; int N_length = 1]'
/usr/include/blitz/tvevaluate.h:195:81:   required from 'void
blitz::TinyVector<T, N>::_tv_evaluate(const T_expr&, T_update) [with T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<bool> >; T_update =
blitz::_bz_update<bool, bool>; P_numtype = bool; int N_length = 1]'
/usr/include/blitz/tinyvec2.cc:89:57:   required from 'blitz::TinyVector<T, N>&
blitz::TinyVector<T, N>::operator=(const blitz::ETBase<T_expr>&) [with T_expr =
blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<bool> >; P_numtype = bool;
int N_length = 1]'
/usr/include/blitz/tinyvec2.cc:77:13:   required from 'blitz::TinyVector<T, N>&
blitz::TinyVector<T, N>::initialize(blitz::TinyVector<T, N>::T_numtype) [with
P_numtype = bool; int N_length = 1; blitz::TinyVector<T, N>::T_numtype = bool]'
/usr/include/blitz/listinit.h:90:13:   required from
'blitz::ListInitializationSwitch<T_array,
T_iterator>::~ListInitializationSwitch() [with T_array =
blitz::TinyVector<bool, 1>; T_iterator = bool*]'
/usr/include/blitz/array/storage.h:93:24:   required from
'blitz::GeneralArrayStorage<N_rank>::GeneralArrayStorage(blitz::paddingPolicy)
[with int N_rank = 1]'
/usr/include/blitz/array/storage.h:228:47:   required from here
/usr/include/blitz/tvevaluate.h:108:17: internal compiler error: in
tsubst_copy, at cp/pt.c:12887
     for (int i=0; i < N_length; ++i)
                 ^
Please submit a full bug report,
**************************************************************************************



Trying to better prepare the bug report and executing gcc with "-save-temps"
results in another ICE:



**************************************************************************************
In file included from /usr/include/blitz/globeval.cc:34:0,
                 from /usr/include/blitz/array/ops.cc:38,
                 from /usr/include/blitz/array.cc:13,
                 from /usr/include/blitz/array-impl.h:2559,
                 from bug.cpp:2:
/usr/include/blitz/tvevaluate.h:38:0: internal compiler error: in
c_pp_lookup_pragma, at c-family/c-pragma.c:1232

 ^
Please submit a full bug report,
**************************************************************************************


How to best help in tracking those down?
Sylwester


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
@ 2014-02-18 23:07 ` jakub at gcc dot gnu.org
  2014-02-18 23:18 ` slayoo at staszic dot waw.pl
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-18 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Please provide preprocessed testcase (see http://gcc.gnu.org/bugs.html for
details).


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
  2014-02-18 23:07 ` [Bug c++/60267] " jakub at gcc dot gnu.org
@ 2014-02-18 23:18 ` slayoo at staszic dot waw.pl
  2014-02-18 23:46 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-02-18 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sylwester Arabas <slayoo at staszic dot waw.pl> ---
As I've mentioned, trying to use -save-temps results in another ICE and an
abruptly cut .ii file (last line ends with an unfinished #pragma). The .ii file
fails to compile and does not give the ICE.

S.


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
  2014-02-18 23:07 ` [Bug c++/60267] " jakub at gcc dot gnu.org
  2014-02-18 23:18 ` slayoo at staszic dot waw.pl
@ 2014-02-18 23:46 ` pinskia at gcc dot gnu.org
  2014-02-19  6:11 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-02-18 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you try reducing the header file (using delta) to get a reduced testcase?


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (2 preceding siblings ...)
  2014-02-18 23:46 ` pinskia at gcc dot gnu.org
@ 2014-02-19  6:11 ` jakub at gcc dot gnu.org
  2014-02-19  9:00 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-19  6:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In how many places you have the #pragma GCC ivdep pragmas?  Can you e.g. try to
replace them by #pragma ivdep, preprocess, then replace them back in the
preprocessed file?  Or #pragma omp simd instead of #pragma ivdep.


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (3 preceding siblings ...)
  2014-02-19  6:11 ` jakub at gcc dot gnu.org
@ 2014-02-19  9:00 ` jakub at gcc dot gnu.org
  2014-02-19 13:46 ` slayoo at staszic dot waw.pl
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-19  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32167
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32167&action=edit
gcc49-pr60267.patch

Untested fix for the preprocessing ICE.  So, with this patch you should be able
to preprocess the file now.


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (4 preceding siblings ...)
  2014-02-19  9:00 ` jakub at gcc dot gnu.org
@ 2014-02-19 13:46 ` slayoo at staszic dot waw.pl
  2014-02-19 16:45 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-02-19 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Sylwester Arabas <slayoo at staszic dot waw.pl> ---
Created attachment 32172
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32172&action=edit
preprocessed source trigerring ICE with g++ snapshot 20140212

Thanks a lot for looking at it.
I'm attaching the source proprocessed with g++ 4.8.2.
It gives the tsubst_copy ICE with the 20140212 g++ snapshot.

HTH,
Sylwester


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (5 preceding siblings ...)
  2014-02-19 13:46 ` slayoo at staszic dot waw.pl
@ 2014-02-19 16:45 ` jakub at gcc dot gnu.org
  2014-02-19 18:12 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-19 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 19 16:45:21 2014
New Revision: 207911

URL: http://gcc.gnu.org/viewcvs?rev=207911&root=gcc&view=rev
Log:
    PR c++/60267
    * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
    for PRAGMA_IVDEP if flag_preprocess_only.

    * gcc.dg/pr60267.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr60267.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-pragma.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (6 preceding siblings ...)
  2014-02-19 16:45 ` jakub at gcc dot gnu.org
@ 2014-02-19 18:12 ` jakub at gcc dot gnu.org
  2014-02-19 18:35 ` jakub at gcc dot gnu.org
  2014-03-09 14:22 ` slayoo at staszic dot waw.pl
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-19 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 19 18:11:54 2014
New Revision: 207914

URL: http://gcc.gnu.org/viewcvs?rev=207914&root=gcc&view=rev
Log:
    PR c++/60267
    * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.

    * g++.dg/ext/ivdep-1.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ext/ivdep-1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (7 preceding siblings ...)
  2014-02-19 18:12 ` jakub at gcc dot gnu.org
@ 2014-02-19 18:35 ` jakub at gcc dot gnu.org
  2014-03-09 14:22 ` slayoo at staszic dot waw.pl
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-19 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.


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

* [Bug c++/60267] ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887
  2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
                   ` (8 preceding siblings ...)
  2014-02-19 18:35 ` jakub at gcc dot gnu.org
@ 2014-03-09 14:22 ` slayoo at staszic dot waw.pl
  9 siblings, 0 replies; 11+ messages in thread
From: slayoo at staszic dot waw.pl @ 2014-03-09 14:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Sylwester Arabas <slayoo at staszic dot waw.pl> ---
Just confirming it solved the problem with compilation of Blitz++ with the
ivdep pragmas. 

Thanks,
Sylwester

P.S. Turning them on, causes a slowdown in this case, though :).


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

end of thread, other threads:[~2014-03-09 14:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18 22:59 [Bug c++/60267] New: ICE in c_pp_lookup_pragma, at c-family/c-pragma.c:1232; ICE in tsubst_copy, at cp/pt.c:12887 slayoo at staszic dot waw.pl
2014-02-18 23:07 ` [Bug c++/60267] " jakub at gcc dot gnu.org
2014-02-18 23:18 ` slayoo at staszic dot waw.pl
2014-02-18 23:46 ` pinskia at gcc dot gnu.org
2014-02-19  6:11 ` jakub at gcc dot gnu.org
2014-02-19  9:00 ` jakub at gcc dot gnu.org
2014-02-19 13:46 ` slayoo at staszic dot waw.pl
2014-02-19 16:45 ` jakub at gcc dot gnu.org
2014-02-19 18:12 ` jakub at gcc dot gnu.org
2014-02-19 18:35 ` jakub at gcc dot gnu.org
2014-03-09 14:22 ` slayoo at staszic dot waw.pl

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