public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc
@ 2013-05-22 21:49 dhazeghi at yahoo dot com
  2013-05-23  8:05 ` [Bug rtl-optimization/57381] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2013-05-22 21:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57381
           Summary: array of volatile pointers hangs gcc
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dhazeghi at yahoo dot com

The following code causes gcc trunk and 4.8 branch to hang at -O1 or above due
to it consuming all available memory (well over 2GB after 10 seconds).

$ gcc-trunk -v
Target: x86_64-unknown-linux-gnu
gcc version 4.9.0 20130522 (experimental) [trunk revision 199191] (GCC) 
$ time gcc-trunk -O0 -c small.c

real    0m0.023s
user    0m0.008s
sys    0m0.008s
$ time gcc-4.7 -O1 -c small.c

real    0m0.028s
user    0m0.004s
sys    0m0.016s
$ time timeout 10 gcc-trunk -O1 -c small.c

real    0m10.002s
user    0m0.000s
sys    0m0.004s
$ echo $?
124

----------------------------------
struct S0 { int  f0, f1, f2; };

struct S1 {
   int  f0;
   volatile struct S0 f2;
};

static struct S1 s = {0x47BED265,{0x06D4EB3E,5,0U}};

int foo(struct S0 p)
{
    for (s.f2.f2 = 0; (s.f2.f2 <= 12); s.f2.f2++)
    {
        volatile int *l_61[5][2][2] =
{{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,(void*)0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{(void*)0,&s.f2.f0}}};

        volatile int **l_68 = &l_61[0][0][1];
        volatile int *l_76 = &s.f2.f0;
        (*l_68) = l_61[0][0][0];
        if ((*l_76 = (p.f2 % 5))) ;
    }
    return p.f0;
}


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

* [Bug rtl-optimization/57381] [4.8/4.9 Regression] array of volatile pointers hangs gcc
  2013-05-22 21:49 [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc dhazeghi at yahoo dot com
@ 2013-05-23  8:05 ` rguenth at gcc dot gnu.org
  2013-05-23 10:09 ` [Bug rtl-optimization/57381] [4.8 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-05-23
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.8.1
            Summary|array of volatile pointers  |[4.8/4.9 Regression] array
                   |hangs gcc                   |of volatile pointers hangs
                   |                            |gcc
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.  Hangs in

0x0000000000caeac6 in visit_use (use=0x7ffff6e3eee8)
    at /space/rguenther/src/svn/trunk/gcc/tree-ssa-sccvn.c:3469
3469                changed = visit_reference_op_store (lhs, rhs1, stmt);


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

* [Bug rtl-optimization/57381] [4.8 Regression] array of volatile pointers hangs gcc
  2013-05-22 21:49 [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc dhazeghi at yahoo dot com
  2013-05-23  8:05 ` [Bug rtl-optimization/57381] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-05-23 10:09 ` rguenth at gcc dot gnu.org
  2013-08-29 13:15 ` jakub at gcc dot gnu.org
  2013-08-29 13:18 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-23 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.9.0
   Target Milestone|4.8.1                       |4.8.2
            Summary|[4.8/4.9 Regression] array  |[4.8 Regression] array of
                   |of volatile pointers hangs  |volatile pointers hangs gcc
                   |gcc                         |
      Known to fail|                            |4.8.1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu May 23 10:08:33 2013
New Revision: 199240

URL: http://gcc.gnu.org/viewcvs?rev=199240&root=gcc&view=rev
Log:
2013-05-23  Richard Biener  <rguenther@suse.de>

    PR middle-end/57381
    * fold-const.c (operand_equal_p): Compare FIELD_DECLs with
    OEP_CONSTANT_ADDRESS_OF retained.

    * gcc.dg/torture/pr57381.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr57381.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/57381] [4.8 Regression] array of volatile pointers hangs gcc
  2013-05-22 21:49 [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc dhazeghi at yahoo dot com
  2013-05-23  8:05 ` [Bug rtl-optimization/57381] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
  2013-05-23 10:09 ` [Bug rtl-optimization/57381] [4.8 " rguenth at gcc dot gnu.org
@ 2013-08-29 13:15 ` jakub at gcc dot gnu.org
  2013-08-29 13:18 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-29 13:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Aug 29 13:14:59 2013
New Revision: 202074

URL: http://gcc.gnu.org/viewcvs?rev=202074&root=gcc&view=rev
Log:
    Backported from mainline
    2013-07-22  Georg-Johann Lay  <avr@gjlay.de>

    PR testsuite/52641
    * gcc.dg/torture/pr57381.c: Add dg-require-effective-target int32plus.

    2013-05-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/57381
    PR tree-optimization/57417
    * tree-ssa-sccvn.c (vn_reference_fold_indirect): Fix test
    for unchanged base.
    (set_ssa_val_to): Compare addresses using
    get_addr_base_and_unit_offset.

    PR tree-optimization/57417
    * gcc.dg/torture/pr57417.c: New testcase.

    2013-05-23  Richard Biener  <rguenther@suse.de>

    PR middle-end/57381
    * gcc.dg/torture/pr57381.c: New testcase.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57381.c
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr57417.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-ssa-sccvn.c


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

* [Bug rtl-optimization/57381] [4.8 Regression] array of volatile pointers hangs gcc
  2013-05-22 21:49 [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc dhazeghi at yahoo dot com
                   ` (2 preceding siblings ...)
  2013-08-29 13:15 ` jakub at gcc dot gnu.org
@ 2013-08-29 13:18 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-29 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2013-08-29 13:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 21:49 [Bug rtl-optimization/57381] New: array of volatile pointers hangs gcc dhazeghi at yahoo dot com
2013-05-23  8:05 ` [Bug rtl-optimization/57381] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-05-23 10:09 ` [Bug rtl-optimization/57381] [4.8 " rguenth at gcc dot gnu.org
2013-08-29 13:15 ` jakub at gcc dot gnu.org
2013-08-29 13:18 ` 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).