public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54825] New: ICE with vector extension
@ 2012-10-05 13:57 drepper.fsp at gmail dot com
  2012-10-05 13:58 ` [Bug c++/54825] " drepper.fsp at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-10-05 13:57 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54825
           Summary: ICE with vector extension
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: drepper.fsp@gmail.com
              Host: x86_64-linux


While trying to convert some of libstdc++ to use gcc's vector extensions I ran
into this ICE.  The code /should/ be valid.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
@ 2012-10-05 13:58 ` drepper.fsp at gmail dot com
  2012-10-05 13:59 ` drepper.fsp at gmail dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-10-05 13:58 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2012-10-05 13:58:21 UTC ---
In case the version number isn't making this clear, I tested this with the
current mainline code.  4.7 probably won't work at all since some of the
features used have been added to the C++ frontend after 4.7.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
  2012-10-05 13:58 ` [Bug c++/54825] " drepper.fsp at gmail dot com
@ 2012-10-05 13:59 ` drepper.fsp at gmail dot com
  2012-10-05 14:03 ` paolo.carlini at oracle dot com
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-10-05 13:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Ulrich Drepper <drepper.fsp at gmail dot com> 2012-10-05 13:59:26 UTC ---
Created attachment 28363
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28363
Reproducer

Why didn't BZ add the file?...


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
  2012-10-05 13:58 ` [Bug c++/54825] " drepper.fsp at gmail dot com
  2012-10-05 13:59 ` drepper.fsp at gmail dot com
@ 2012-10-05 14:03 ` paolo.carlini at oracle dot com
  2012-10-05 14:15 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-05 14:03 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-05 14:03:03 UTC ---
Maybe Marc is willing to delve a bit into this.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (2 preceding siblings ...)
  2012-10-05 14:03 ` paolo.carlini at oracle dot com
@ 2012-10-05 14:15 ` rguenth at gcc dot gnu.org
  2012-10-05 14:20 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 14:15 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-10-05
     Ever Confirmed|0                           |1

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 14:15:22 UTC ---
What ICE?  With what options?  The testcase doesn't compile for me at -O0:

/tmp/t.ii:586:36:   required from here
/tmp/t.ii:378:24: error: 'typeof' was not declared in this scope
      __v *= (typeof(__v)) { __mult * __param.stddev(),
                        ^
/tmp/t.ii:397:24: error: 'typeof' was not declared in this scope
      __v *= (typeof(__v)) { __mult, __mult };

ah, -std=gnu++0x required ...

> ./cc1plus  -quiet /tmp/t.ii -msse4 -std=gnu++0x
/tmp/t.ii: In function '__m128i
__gnu_cxx::{anonymous}::__sse2_recursion(__m128i, __m128i, __m128i, __m128i)
[with long unsigned int __sl1 = 18ul; long unsigned int __sl2 = 1ul; long
unsigned int __sr1 = 11ul; long unsigned int __sr2 = 1ul; unsigned int __msk1 =
3758096367u; unsigned int __msk2 = 3724462975u; unsigned int __msk3 =
3220897791u; unsigned int __msk4 = 3221225462u; __m128i = __vector(2) long long
int]':
/tmp/t.ii:17:58: error: the last argument must be an 8-bit immediate
   return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8);
                                                          ^
/tmp/t.ii:32:58: error: the last argument must be an 8-bit immediate
   return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8);
                                                          ^

still not an ICE.  It's an error.  Compiles ok with optimization.

So - can you be a little more verbose?


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (3 preceding siblings ...)
  2012-10-05 14:15 ` rguenth at gcc dot gnu.org
@ 2012-10-05 14:20 ` paolo.carlini at oracle dot com
  2012-10-05 14:20 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-05 14:20 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-05 14:19:56 UTC ---
(by the way, the errors reminds me PR54079: I wonder if we can close it or we
want to do something about it?)

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 14:19:56 UTC ---
With -O2 it ICEs in PRE.  Mine.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (4 preceding siblings ...)
  2012-10-05 14:20 ` paolo.carlini at oracle dot com
@ 2012-10-05 14:20 ` rguenth at gcc dot gnu.org
  2012-10-05 14:28 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 14:20 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-05 14:19:56 UTC ---
(by the way, the errors reminds me PR54079: I wonder if we can close it or we
want to do something about it?)

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 14:19:56 UTC ---
With -O2 it ICEs in PRE.  Mine.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (5 preceding siblings ...)
  2012-10-05 14:20 ` rguenth at gcc dot gnu.org
@ 2012-10-05 14:28 ` rguenth at gcc dot gnu.org
  2012-10-05 14:29 ` glisse at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 14:28 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 14:28:25 UTC ---
Created attachment 28364
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28364
patch

patch I am testing.


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (6 preceding siblings ...)
  2012-10-05 14:28 ` rguenth at gcc dot gnu.org
@ 2012-10-05 14:29 ` glisse at gcc dot gnu.org
  2012-10-05 14:33 ` glisse at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-05 14:29 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-05 14:29:07 UTC ---
Hmm, how should I compile the code?

I tried with g++ bug.cc -std=c++11 but that fails because of typeof (you want
decltype instead). With -std=gnu++11, I get an error that "the last argument
must be an 8-bit immediate" in __builtin_ia32_psrldqi128, which seems like a
bug, but not the ICE reported here. Ah, if I remove the body of
__sse2_recursion (and make it non-inline) and compile with -O2, then I get an
ICE (but not with -O1) in tree-ssa-pre.c. Is that it? I'll look (but will
probably have to defer to more knowledgeable people).


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

* [Bug c++/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (7 preceding siblings ...)
  2012-10-05 14:29 ` glisse at gcc dot gnu.org
@ 2012-10-05 14:33 ` glisse at gcc dot gnu.org
  2012-10-05 14:49 ` [Bug tree-optimization/54825] " paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-05 14:33 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-05 14:32:45 UTC ---
(In reply to comment #8)

Forget my comment, apparently Richard found the bug before I could even read
the report... :-)


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

* [Bug tree-optimization/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (8 preceding siblings ...)
  2012-10-05 14:33 ` glisse at gcc dot gnu.org
@ 2012-10-05 14:49 ` paolo.carlini at oracle dot com
  2012-10-05 15:12 ` drepper.fsp at gmail dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-05 14:49 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |tree-optimization

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-05 14:49:33 UTC ---
Ah great.


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

* [Bug tree-optimization/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (9 preceding siblings ...)
  2012-10-05 14:49 ` [Bug tree-optimization/54825] " paolo.carlini at oracle dot com
@ 2012-10-05 15:12 ` drepper.fsp at gmail dot com
  2012-10-08 11:58 ` rguenth at gcc dot gnu.org
  2012-10-08 12:00 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-10-05 15:12 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Ulrich Drepper <drepper.fsp at gmail dot com> 2012-10-05 15:12:18 UTC ---
(In reply to comment #7)
> Created attachment 28364 [details]
> patch
> 
> patch I am testing.

This seems to fix the problem for me, even with the original code and not the
reduced test case.


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

* [Bug tree-optimization/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (10 preceding siblings ...)
  2012-10-05 15:12 ` drepper.fsp at gmail dot com
@ 2012-10-08 11:58 ` rguenth at gcc dot gnu.org
  2012-10-08 12:00 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-08 11:58 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-08 11:58:08 UTC ---
Author: rguenth
Date: Mon Oct  8 11:58:03 2012
New Revision: 192205

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192205
Log:
2012-10-08  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/54825
    * tree-ssa-sccvn.c (vn_nary_length_from_stmt): Handle BIT_FIELD_REF.
    (init_vn_nary_op_from_stmt): Likewise.
    * tree-ssa-pre.c (compute_avail): Use vn_nary_op_lookup_stmt.
    * tree-ssa-sccvn.h (sizeof_vn_nary_op): Avoid overflow.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-pre.c
    trunk/gcc/tree-ssa-sccvn.c
    trunk/gcc/tree-ssa-sccvn.h


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

* [Bug tree-optimization/54825] ICE with vector extension
  2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
                   ` (11 preceding siblings ...)
  2012-10-08 11:58 ` rguenth at gcc dot gnu.org
@ 2012-10-08 12:00 ` rguenth at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-08 12:00 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-08 12:00:23 UTC ---
Fixed.


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

end of thread, other threads:[~2012-10-08 12:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05 13:57 [Bug c++/54825] New: ICE with vector extension drepper.fsp at gmail dot com
2012-10-05 13:58 ` [Bug c++/54825] " drepper.fsp at gmail dot com
2012-10-05 13:59 ` drepper.fsp at gmail dot com
2012-10-05 14:03 ` paolo.carlini at oracle dot com
2012-10-05 14:15 ` rguenth at gcc dot gnu.org
2012-10-05 14:20 ` paolo.carlini at oracle dot com
2012-10-05 14:20 ` rguenth at gcc dot gnu.org
2012-10-05 14:28 ` rguenth at gcc dot gnu.org
2012-10-05 14:29 ` glisse at gcc dot gnu.org
2012-10-05 14:33 ` glisse at gcc dot gnu.org
2012-10-05 14:49 ` [Bug tree-optimization/54825] " paolo.carlini at oracle dot com
2012-10-05 15:12 ` drepper.fsp at gmail dot com
2012-10-08 11:58 ` rguenth at gcc dot gnu.org
2012-10-08 12:00 ` rguenth at gcc dot gnu.org

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