public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/18081] New: Infinite memory allocation on -O3
@ 2004-10-20 15:40 trauscher at loytec dot com
  2004-10-22 18:02 ` [Bug rtl-optimization/18081] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 21+ messages in thread
From: trauscher at loytec dot com @ 2004-10-20 15:40 UTC (permalink / raw)
  To: gcc-bugs

When compiling the following code, cc1
enters an infinite loop allocating memory until
virtual memory is exhausted.

arm-rtems-elf-gcc-3.4.2 -O3 -c -otest.o test.c

The bug disappears when using -O2 or when
using -O3 with -fno-inline-functions or
-fno-gcse
It also disappears by removing lines from the
program.

test.c:

int rd(int *p) {
  if (p<((int*)4)) return 0;
  return *p;
}

void wr(int *p) {
  if (p<((int*)4)) return;
  *p = 0;
}

void test(void *p)
{
  int i;
  int a[2];

  for(i=0;i<2;i++)
  {
    wr(p);
    a[i]=rd(p);
  }
}

-- 
           Summary: Infinite memory allocation on -O3
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: trauscher at loytec dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-linux
GCC target triplet: arm-rtems-elf


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


^ permalink raw reply	[flat|nested] 21+ messages in thread
[parent not found: <bug-18081-4801@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-05-17  8:48 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 15:40 [Bug rtl-optimization/18081] New: Infinite memory allocation on -O3 trauscher at loytec dot com
2004-10-22 18:02 ` [Bug rtl-optimization/18081] [3.4 only] " pinskia at gcc dot gnu dot org
2004-11-01  0:47 ` mmitchel at gcc dot gnu dot org
2005-01-12  7:28 ` corsepiu at gcc dot gnu dot org
2005-01-12  7:46 ` corsepiu at gcc dot gnu dot org
2005-01-14 23:11 ` [Bug rtl-optimization/18081] [3.4 regression] " pinskia at gcc dot gnu dot org
2005-05-04 10:11 ` gtolstolytkin at ru dot mvista dot com
2005-05-04 12:13 ` giovannibajo at libero dot it
2005-05-04 16:33 ` mark at codesourcery dot com
2005-05-04 17:19 ` giovannibajo at libero dot it
2005-05-08 13:50 ` gtolstolytkin at ru dot mvista dot com
2005-05-08 18:07 ` gtolstolytkin at ru dot mvista dot com
2005-05-10  6:05 ` pinskia at gcc dot gnu dot org
2005-05-10 13:24 ` schwab at suse dot de
2005-05-10 13:30 ` schwab at suse dot de
2005-05-10 15:20 ` mark at codesourcery dot com
2005-05-10 19:29 ` pinskia at gcc dot gnu dot org
2005-05-10 21:32 ` hjl at lucon dot org
2005-05-10 21:35 ` hjl at lucon dot org
2005-05-10 22:43 ` pinskia at gcc dot gnu dot org
     [not found] <bug-18081-4801@http.gcc.gnu.org/bugzilla/>
2006-05-17  8:48 ` jserv at kaffe dot 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).