public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern
@ 2012-04-06 17:16 merkil at savhon dot org
  2012-04-10 12:08 ` [Bug tree-optimization/52891] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: merkil at savhon dot org @ 2012-04-06 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52891
           Summary: ICE in adjust_bool_pattern
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: merkil@savhon.org


I seem to have triggered a bug in the tree vectorizer of GCC as of 20120404.

$ cat file.c

struct S1
{
    int intfield;

    struct
    {
        unsigned ufield:10;
    } sfield;
};

int func2(short param1, short param2)
{
    int **intptr;

    if((param1 && param2) + **intptr)
        while(1);
}

void func1(void)
{
    struct S1 foo;
    func2(foo.intfield, foo.sfield.ufield);
}

$ ~/gcc/dist/bin/gcc --version

gcc (GCC) 4.8.0 20120404 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ~/gcc/dist/bin/gcc -O2 -ftree-vectorize file.c


Using built-in specs.
COLLECT_GCC=/home/merkil/gcc/dist/bin/gcc
COLLECT_LTO_WRAPPER=/home/merkil/gcc/dist/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../srcdir/configure --prefix=/home/merkil/gcc/dist CFLAGS='
-O2 -pipe' CXXFLAGS=' -O2 -pipe' --enable-languages=c,c++,lto
Thread model: posix
gcc version 4.8.0 20120404 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-O2' '-ftree-vectorize' '-v' '-mtune=generic'
'-march=x86-64'
 /home/merkil/gcc/dist/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1 -quiet -v
file.c -quiet -dumpbase file.c -mtune=generic -march=x86-64 -auxbase file -O2
-version -ftree-vectorize -o /tmp/ccuzSuSy.s
GNU C (GCC) version 4.8.0 20120404 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0 20120404 (experimental), GMP version 5.0.4,
MPFR version 3.1.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/home/merkil/gcc/dist/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/merkil/gcc/dist/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
 /usr/local/include
 /home/merkil/gcc/dist/include
 /home/merkil/gcc/dist/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.8.0 20120404 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.8.0 20120404 (experimental), GMP version 5.0.4,
MPFR version 3.1.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 77c744b2fbaa15d9025679f4b671f18a
file.c: In function 'func1':
file.c:19:6: internal compiler error: in adjust_bool_pattern, at
tree-vect-patterns.c:2301
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Hope that is useful to you :-)


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
@ 2012-04-10 12:08 ` rguenth at gcc dot gnu.org
  2012-04-10 14:09 ` regehr at cs dot utah.edu
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-10 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-10
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.8.0
            Summary|ICE in adjust_bool_pattern  |[4.8 Regression] ICE in
                   |                            |adjust_bool_pattern
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-10 12:08:01 UTC ---
Confirmed.


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
  2012-04-10 12:08 ` [Bug tree-optimization/52891] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-04-10 14:09 ` regehr at cs dot utah.edu
  2012-04-20 12:59 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: regehr at cs dot utah.edu @ 2012-04-10 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

John Regehr <regehr at cs dot utah.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |regehr at cs dot utah.edu

--- Comment #2 from John Regehr <regehr at cs dot utah.edu> 2012-04-10 14:08:41 UTC ---
Another small testcase, if that's helpful.

[regehr@dyson r18]$ cat small.c 
#pragma pack(1)
struct S2
{
    unsigned f0:22;
};
struct
{
    struct S2 f0;
} c;
int a, b, d;
void
fn1 ()
{
    if (1 ? (!c.f0.f0 & d < 0) < a : 0)
        b = 0;
}


[regehr@dyson r18]$ current-gcc -O3 -c small.c
small.c: In function 'fn1':
small.c:12:1: internal compiler error: in adjust_bool_pattern, at
tree-vect-patterns.c:2301
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[regehr@dyson r18]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r186257-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r186257-install
--program-prefix=r186257- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120410 (experimental) (GCC)


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
  2012-04-10 12:08 ` [Bug tree-optimization/52891] [4.8 Regression] " rguenth at gcc dot gnu.org
  2012-04-10 14:09 ` regehr at cs dot utah.edu
@ 2012-04-20 12:59 ` jakub at gcc dot gnu.org
  2012-04-23 10:14 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-04-20 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-04-20 12:58:28 UTC ---
Created attachment 27202
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27202
gcc48-pr52891.patch

Untested fix.  Sorry for the delay.


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
                   ` (2 preceding siblings ...)
  2012-04-20 12:59 ` jakub at gcc dot gnu.org
@ 2012-04-23 10:14 ` jakub at gcc dot gnu.org
  2012-04-23 10:17 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-04-23 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-04-23 10:13:46 UTC ---
Author: jakub
Date: Mon Apr 23 10:13:39 2012
New Revision: 186694

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186694
Log:
    PR tree-optimizations/52891
    * tree-vect-patterns.c (adjust_bool_pattern): Use
    build_nonstandard_type even if rhs1 has unsigned INTEGER_TYPE,
    but with non-standard precision.

    * gcc.c-torture/compile/pr52891-1.c: New test.    
    * gcc.c-torture/compile/pr52891-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr52891-1.c
    trunk/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-patterns.c


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
                   ` (3 preceding siblings ...)
  2012-04-23 10:14 ` jakub at gcc dot gnu.org
@ 2012-04-23 10:17 ` jakub at gcc dot gnu.org
  2012-04-24 11:47 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-04-23 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-04-23 10:17:08 UTC ---
Author: jakub
Date: Mon Apr 23 10:16:57 2012
New Revision: 186695

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186695
Log:
    PR tree-optimizations/52891
    * tree-vect-patterns.c (adjust_bool_pattern): Use
    build_nonstandard_type even if rhs1 has unsigned INTEGER_TYPE,
    but with non-standard precision.

    * gcc.c-torture/compile/pr52891-1.c: New test.    
    * gcc.c-torture/compile/pr52891-2.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr52891-1.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-vect-patterns.c


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
                   ` (4 preceding siblings ...)
  2012-04-23 10:17 ` jakub at gcc dot gnu.org
@ 2012-04-24 11:47 ` jakub at gcc dot gnu.org
  2012-04-24 17:08 ` gjl at gcc dot gnu.org
  2012-04-24 17:19 ` gjl at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-04-24 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-04-24 11:47:12 UTC ---
Fixed.


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
                   ` (5 preceding siblings ...)
  2012-04-24 11:47 ` jakub at gcc dot gnu.org
@ 2012-04-24 17:08 ` gjl at gcc dot gnu.org
  2012-04-24 17:19 ` gjl at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-04-24 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-04-24 17:08:28 UTC ---
Author: gjl
Date: Tue Apr 24 17:08:20 2012
New Revision: 186775

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186775
Log:
    PR testsuite/52641
    PR tree-optimizations/52891
    * gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.


Modified:
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c


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

* [Bug tree-optimization/52891] [4.8 Regression] ICE in adjust_bool_pattern
  2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
                   ` (6 preceding siblings ...)
  2012-04-24 17:08 ` gjl at gcc dot gnu.org
@ 2012-04-24 17:19 ` gjl at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-04-24 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-04-24 17:19:03 UTC ---
Author: gjl
Date: Tue Apr 24 17:18:54 2012
New Revision: 186776

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186776
Log:
    PR testsuite/52641
    PR tree-optimizations/52891
    * gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.c-torture/compile/pr52891-2.c


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

end of thread, other threads:[~2012-04-24 17:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 17:16 [Bug tree-optimization/52891] New: ICE in adjust_bool_pattern merkil at savhon dot org
2012-04-10 12:08 ` [Bug tree-optimization/52891] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-04-10 14:09 ` regehr at cs dot utah.edu
2012-04-20 12:59 ` jakub at gcc dot gnu.org
2012-04-23 10:14 ` jakub at gcc dot gnu.org
2012-04-23 10:17 ` jakub at gcc dot gnu.org
2012-04-24 11:47 ` jakub at gcc dot gnu.org
2012-04-24 17:08 ` gjl at gcc dot gnu.org
2012-04-24 17:19 ` gjl 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).