public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12187] New: Miscompilation of nested functions using host variables
@ 2003-09-05 22:34 pbrook at gcc dot gnu dot org
  2003-09-05 23:11 ` [Bug optimization/12187] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2003-09-05 22:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Miscompilation of nested functions using host variables
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pbrook at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org

Functions containing nested functions which write to variables in their parent 
are miscompiled. This might be rare in C, but is quite common in Fortran. 
 
Simple Testcase 
 
int main() 
{ 
  int a; 
  void test(int i) 
    { 
      a = i; 
    }; 
  a = 0; 
  test (42); 
  if (a != 42) 
    abort (); 
  exit (0); 
}


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

* [Bug optimization/12187] Miscompilation of nested functions using host variables
  2003-09-05 22:34 [Bug optimization/12187] New: Miscompilation of nested functions using host variables pbrook at gcc dot gnu dot org
@ 2003-09-05 23:11 ` pinskia at gcc dot gnu dot org
  2003-09-14 22:39 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-05 23:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-05 23:11:32
               date|                            |
   Target Milestone|---                         |tree-ssa


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-05 23:11 -------
I thought I saw a bug like this before, the problem is that the store to a in test is removed by dce.


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

* [Bug optimization/12187] Miscompilation of nested functions using host variables
  2003-09-05 22:34 [Bug optimization/12187] New: Miscompilation of nested functions using host variables pbrook at gcc dot gnu dot org
  2003-09-05 23:11 ` [Bug optimization/12187] " pinskia at gcc dot gnu dot org
@ 2003-09-14 22:39 ` steven at gcc dot gnu dot org
  2003-09-14 22:41 ` steven at gcc dot gnu dot org
  2003-10-08 23:50 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-09-14 22:39 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2003-09-05 23:11:32         |2003-09-14 21:41:10
               date|                            |


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

* [Bug optimization/12187] Miscompilation of nested functions using host variables
  2003-09-05 22:34 [Bug optimization/12187] New: Miscompilation of nested functions using host variables pbrook at gcc dot gnu dot org
  2003-09-05 23:11 ` [Bug optimization/12187] " pinskia at gcc dot gnu dot org
  2003-09-14 22:39 ` steven at gcc dot gnu dot org
@ 2003-09-14 22:41 ` steven at gcc dot gnu dot org
  2003-10-08 23:50 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-09-14 22:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org


------- Additional Comments From steven at gcc dot gnu dot org  2003-09-14 21:41 -------
mine mine mine!


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

* [Bug optimization/12187] Miscompilation of nested functions using host variables
  2003-09-05 22:34 [Bug optimization/12187] New: Miscompilation of nested functions using host variables pbrook at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-09-14 22:41 ` steven at gcc dot gnu dot org
@ 2003-10-08 23:50 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-08 23:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-08 23:50 -------
Fixed on the branch.


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

end of thread, other threads:[~2003-10-08 23:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-05 22:34 [Bug optimization/12187] New: Miscompilation of nested functions using host variables pbrook at gcc dot gnu dot org
2003-09-05 23:11 ` [Bug optimization/12187] " pinskia at gcc dot gnu dot org
2003-09-14 22:39 ` steven at gcc dot gnu dot org
2003-09-14 22:41 ` steven at gcc dot gnu dot org
2003-10-08 23:50 ` 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).