public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
@ 2011-08-02 17:42 arthur.j.odwyer at gmail dot com
  2011-08-02 17:43 ` [Bug rtl-optimization/49948] " arthur.j.odwyer at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-08-02 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE with -ftree-parallelize-loops: "address taken, but
                    ADDRESSABLE bit not set"
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arthur.j.odwyer@gmail.com


Created attachment 24894
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24894
Output of "ajo-gcc -O3 -ftree-parallelize-loops=2 -std=c99 -c test.c -v"

This failure reproduces for me with svn revision 177081 (2011-08-02), and also
with gcc 4.5.1. I'm on Ubuntu 10.10, x86-64 (-march=amdfam10).

cat >test.c <<EOF
extern int ej, *ep;
int func_40() {
    int l_48, l_327 = 8;
    if (ej <= 7) {
        int *l_335[8];
        for (int i = 0; i < 8; ++i)
          l_335[i] = &l_48;
        while (--l_327) {
            ej = 0;
            ep = l_335[0];
        }
        return 0;
    }
    return (ep == &l_327);
}
EOF
gcc -O3 -ftree-parallelize-loops=2 -std=c99 -c test.c

test.c: In function ‘func_40’:
test.c:13:5: error: address taken, but ADDRESSABLE bit not set
l_48
cc1: note: in statement
vect_cst_.15_1 = {&l_48, &l_48};
test.c:13:5: internal compiler error: verify_gimple failed

With gcc 4.5.1, I get this ICE instead. Bug 28233 might be related:

test.c: In function ‘func_40’:
test.c:18:22: internal compiler error: in make_decl_rtl, at varasm.c:1347


This test case is reduced from the output of Csmith 2.1.0 (git hash 210eda7,
https://github.com/Quuxplusone/csmith/), using the following command line:
csmith --no-paranoid --no-longlong --pointers --arrays --jumps --no-consts
--no-volatiles --no-checksum --divs --muls --bitfields --no-packed-struct -s
955105426


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

* [Bug rtl-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
@ 2011-08-02 17:43 ` arthur.j.odwyer at gmail dot com
  2011-08-03  9:44 ` [Bug tree-optimization/49948] " rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2011-08-02 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> 2011-08-02 17:43:00 UTC ---
Created attachment 24895
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24895
Output of "gcc-4.5 -O3 -ftree-parallelize-loops=2 -std=c99 -c test.c -v"


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
  2011-08-02 17:43 ` [Bug rtl-optimization/49948] " arthur.j.odwyer at gmail dot com
@ 2011-08-03  9:44 ` rguenth at gcc dot gnu.org
  2011-08-03 13:30 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.08.03 09:43:32
          Component|rtl-optimization            |tree-optimization
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 09:43:32 UTC ---
Confirmed.  It looks like some update_stmt is missing (which would set
TREE_ADDRESSABLE when applied to vect_cst_.15_1 = {&l_48, &l_48};).


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
  2011-08-02 17:43 ` [Bug rtl-optimization/49948] " arthur.j.odwyer at gmail dot com
  2011-08-03  9:44 ` [Bug tree-optimization/49948] " rguenth at gcc dot gnu.org
@ 2011-08-03 13:30 ` jakub at gcc dot gnu.org
  2011-08-03 13:40 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-03 13:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 13:30:05 UTC ---
I believe this is a bug in execute_update_addresses_taken (well, functions it
calls), because until that function (for parloops pass) c is addressable, but
then when processing
vect_cst_.15_1 = {&c, &c};
stmt it doesn't consider c to be address taken.


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (2 preceding siblings ...)
  2011-08-03 13:30 ` jakub at gcc dot gnu.org
@ 2011-08-03 13:40 ` rguenth at gcc dot gnu.org
  2011-08-03 13:45 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 13:38:57 UTC ---
Which means it is a bug in walk_stmt_load_store_addr_ops then (and indeed
that doesn't seem to handle CONSTRUCTOR.

Well.  Mine then.


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (3 preceding siblings ...)
  2011-08-03 13:40 ` rguenth at gcc dot gnu.org
@ 2011-08-03 13:45 ` jakub at gcc dot gnu.org
  2011-08-03 18:51 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-03 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 13:44:14 UTC ---
Created attachment 24902
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24902
gcc47-pr49948.patch

Untested patch.


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (4 preceding siblings ...)
  2011-08-03 13:45 ` jakub at gcc dot gnu.org
@ 2011-08-03 18:51 ` jakub at gcc dot gnu.org
  2011-08-03 18:57 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-03 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 18:49:43 UTC ---
Author: jakub
Date: Wed Aug  3 18:49:40 2011
New Revision: 177291

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177291
Log:
    PR tree-optimization/49948
    * gimple.c (walk_stmt_load_store_addr_ops): Walk CONSTRUCTOR elements.

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

Added:
    trunk/gcc/testsuite/gcc.dg/pr49948.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (5 preceding siblings ...)
  2011-08-03 18:51 ` jakub at gcc dot gnu.org
@ 2011-08-03 18:57 ` jakub at gcc dot gnu.org
  2011-08-04 14:46 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-03 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 18:56:05 UTC ---
Author: jakub
Date: Wed Aug  3 18:56:02 2011
New Revision: 177292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177292
Log:
    PR tree-optimization/49948
    * gimple.c (walk_stmt_load_store_addr_ops): Walk CONSTRUCTOR elements.

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

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr49948.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/gimple.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (6 preceding siblings ...)
  2011-08-03 18:57 ` jakub at gcc dot gnu.org
@ 2011-08-04 14:46 ` jakub at gcc dot gnu.org
  2011-08-08 13:42 ` gjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-04 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-04 14:42:17 UTC ---
Fixed for 4.6+ so far.


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (7 preceding siblings ...)
  2011-08-04 14:46 ` jakub at gcc dot gnu.org
@ 2011-08-08 13:42 ` gjl at gcc dot gnu.org
  2011-08-09 19:27 ` gjl at gcc dot gnu.org
  2012-02-03 12:26 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-08-08 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

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

--- Comment #9 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-08-08 13:41:19 UTC ---
(In reply to comment #6)
> Author: jakub
> Date: Wed Aug  3 18:49:40 2011
> New Revision: 177291
> 
> Added:
>     trunk/gcc/testsuite/gcc.dg/pr49948.c

This causes the following test FAIL:

xgcc: error: unrecognized command line option '-pthread'

compiler exited with status 1
output is:
xgcc: error: unrecognized command line option '-pthread'


FAIL: gcc.dg/pr49948.c (test for excess errors)
Excess errors:
xgcc: error: unrecognized command line option '-pthread'

This is because of
gcc.c:#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"

Please add
/* { dg-require-effective-target pthread_h } */

or a similar gate to respective test cases.

Thanks,

Johann


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (8 preceding siblings ...)
  2011-08-08 13:42 ` gjl at gcc dot gnu.org
@ 2011-08-09 19:27 ` gjl at gcc dot gnu.org
  2012-02-03 12:26 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-08-09 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-08-09 19:27:12 UTC ---
Thanks, Ulrich fixed it:
http://gcc.gnu.org/viewcvs?view=revision&revision=177594


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

* [Bug tree-optimization/49948] ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set"
  2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
                   ` (9 preceding siblings ...)
  2011-08-09 19:27 ` gjl at gcc dot gnu.org
@ 2012-02-03 12:26 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-03 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

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> 2012-02-03 12:25:26 UTC ---
Fixed.


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

end of thread, other threads:[~2012-02-03 12:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-02 17:42 [Bug rtl-optimization/49948] New: ICE with -ftree-parallelize-loops: "address taken, but ADDRESSABLE bit not set" arthur.j.odwyer at gmail dot com
2011-08-02 17:43 ` [Bug rtl-optimization/49948] " arthur.j.odwyer at gmail dot com
2011-08-03  9:44 ` [Bug tree-optimization/49948] " rguenth at gcc dot gnu.org
2011-08-03 13:30 ` jakub at gcc dot gnu.org
2011-08-03 13:40 ` rguenth at gcc dot gnu.org
2011-08-03 13:45 ` jakub at gcc dot gnu.org
2011-08-03 18:51 ` jakub at gcc dot gnu.org
2011-08-03 18:57 ` jakub at gcc dot gnu.org
2011-08-04 14:46 ` jakub at gcc dot gnu.org
2011-08-08 13:42 ` gjl at gcc dot gnu.org
2011-08-09 19:27 ` gjl at gcc dot gnu.org
2012-02-03 12:26 ` jakub 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).