public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
@ 2004-08-08 13:14 gopalv82 at gmail dot com
  2004-08-08 13:22 ` [Bug c/16918] " gopalv82 at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gopalv82 at gmail dot com @ 2004-08-08 13:14 UTC (permalink / raw)
  To: gcc-bugs

The ILNode_BinaryArith_ILNode_GenValue__() function contains

if(ReduceOperator(info, (ILNode*)node, (ILNode**)&node, commonType))
{
    // recursion
    ILNode_GenValue(node);
}

ReduceOperator returns 1 only if the out parameter was modified - however this
is setting up a recursive loop when compiled with "-O2" , but "-O1" works as
expected. 

When a second variable is used for the outParameter , this is not observed. 

The broken (before/) and workedaround (after/) preprocessed .i file and assembly 
listing are available in
http://demo.dotgnu.org/~t3rmin4t0r/code/ppc64-segfault.tar.gz (159k) .

Test was performed on a DUAL G5 (specs inside the tarball).

-- 
           Summary: When out parameter to inlined functions is used based on
                    the return , the return value is ignored in PPC64 in -O2
                    and -O3
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gopalv82 at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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


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

* [Bug c/16918] When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
  2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
@ 2004-08-08 13:22 ` gopalv82 at gmail dot com
  2004-08-08 13:50 ` rainer dot groesslinger at gmx dot net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gopalv82 at gmail dot com @ 2004-08-08 13:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gopalv82 at gmail dot com  2004-08-08 13:22 -------
Lowered priority to minor.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
            Summary|When out parameter to       |When out parameter to
                   |inlined functions is used   |inlined functions is used
                   |based on the return , the   |based on the return , the
                   |return value is ignored in  |return value is ignored in
                   |PPC64 in -O2 and -O3        |PPC64 in -O2 and -O3


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


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

* [Bug c/16918] When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
  2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
  2004-08-08 13:22 ` [Bug c/16918] " gopalv82 at gmail dot com
@ 2004-08-08 13:50 ` rainer dot groesslinger at gmx dot net
  2004-08-08 14:36 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rainer dot groesslinger at gmx dot net @ 2004-08-08 13:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rainer dot groesslinger at
                   |                            |gmx dot net


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


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

* [Bug c/16918] When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
  2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
  2004-08-08 13:22 ` [Bug c/16918] " gopalv82 at gmail dot com
  2004-08-08 13:50 ` rainer dot groesslinger at gmx dot net
@ 2004-08-08 14:36 ` pinskia at gcc dot gnu dot org
  2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
  2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-08 14:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-08 14:36 -------
You are breaking the C standard aliasing rules:
ILNode*)node, (ILNode**)&node

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c/16918] When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
  2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
                   ` (3 preceding siblings ...)
  2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
@ 2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05  8:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-05 08:53 -------
Mark as a dup of bug 21920

*** This bug has been marked as a duplicate of 21920 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug c/16918] When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3
  2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
                   ` (2 preceding siblings ...)
  2004-08-08 14:36 ` pinskia at gcc dot gnu dot org
@ 2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
  2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05  8:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-05 08:53 -------
Reopening to ...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

end of thread, other threads:[~2005-06-05  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-08 13:14 [Bug c/16918] New: When out parameter to inlined functions is used based on the return , the return value is ignored in PPC64 in -O2 and -O3 gopalv82 at gmail dot com
2004-08-08 13:22 ` [Bug c/16918] " gopalv82 at gmail dot com
2004-08-08 13:50 ` rainer dot groesslinger at gmx dot net
2004-08-08 14:36 ` pinskia at gcc dot gnu dot org
2005-06-05  8:53 ` pinskia at gcc dot gnu dot org
2005-06-05  8:53 ` pinskia at gcc dot gnu 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).