public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/23872] New: .t02.original dump weirdness
@ 2005-09-13 20:24 dann at godzilla dot ics dot uci dot edu
  2005-09-13 20:28 ` [Bug c/23872] " pinskia at gcc dot gnu dot org
  2005-09-13 20:45 ` dann at godzilla dot ics dot uci dot edu
  0 siblings, 2 replies; 3+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2005-09-13 20:24 UTC (permalink / raw)
  To: gcc-bugs

Using gcc -O2 -fdump-tree-all -S 
to compile: 

int bar (void) {   return 0;}

int foo (int reject) {   int result = 0;   return result;}

the .t02.original dump looks like:
;; Function bar (bar)
;; enabled by -tree-original
{
  return 0;
}
;; Function foo (foo)
;; enabled by -tree-original
{
  int result = 0;

    int result = 0; <--- this line appears twice...
  return result;
}

If the order of the 2 functions is reversed in the file then the dump looks like:

;; Function foo (foo)
;; enabled by -tree-original
{
  int result = 0;
  <STATEMENT_LIST>  <--- the return does not appear...
}
;; Function bar (bar)
;; enabled by -tree-original
{
  return 0;
}

Using just -fdump-tree-original then the dump for "foo" always looks like the
second version.

-- 
           Summary: .t02.original dump weirdness
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/23872] .t02.original dump weirdness
  2005-09-13 20:24 [Bug middle-end/23872] New: .t02.original dump weirdness dann at godzilla dot ics dot uci dot edu
@ 2005-09-13 20:28 ` pinskia at gcc dot gnu dot org
  2005-09-13 20:45 ` dann at godzilla dot ics dot uci dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-13 20:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-13 20:28 -------
>    int result = 0; <--- this line appears twice...
That is because there is DECL_EXPR there and you just don't see it.

This is all really a front-end issue.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
          Component|middle-end                  |c


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


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

* [Bug c/23872] .t02.original dump weirdness
  2005-09-13 20:24 [Bug middle-end/23872] New: .t02.original dump weirdness dann at godzilla dot ics dot uci dot edu
  2005-09-13 20:28 ` [Bug c/23872] " pinskia at gcc dot gnu dot org
@ 2005-09-13 20:45 ` dann at godzilla dot ics dot uci dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2005-09-13 20:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2005-09-13 20:45 -------
The fact that the dump is different depending on function order or compilation
flags seems to point to either an uninitialized variable or some memory corruption.


-- 


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


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

end of thread, other threads:[~2005-09-13 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-13 20:24 [Bug middle-end/23872] New: .t02.original dump weirdness dann at godzilla dot ics dot uci dot edu
2005-09-13 20:28 ` [Bug c/23872] " pinskia at gcc dot gnu dot org
2005-09-13 20:45 ` dann at godzilla dot ics dot uci dot edu

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