public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25722]  New: Stackpointer is not restored correct at end of function
@ 2006-01-09 12:31 bl at rosetechnology dot dk
  2006-01-09 12:33 ` [Bug target/25722] " bl at rosetechnology dot dk
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bl at rosetechnology dot dk @ 2006-01-09 12:31 UTC (permalink / raw)
  To: gcc-bugs

In at least one case where a lot of local variables have been used in a
function the stackpointer is restored from a register pair where the it have
never been saved.


-- 
           Summary: Stackpointer is not restored correct at end of function
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bl at rosetechnology dot dk
GCC target triplet: avr


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



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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
@ 2006-01-09 12:33 ` bl at rosetechnology dot dk
  2006-01-10 16:56 ` berndtrog at yahoo dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bl at rosetechnology dot dk @ 2006-01-09 12:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bl at rosetechnology dot dk  2006-01-09 12:33 -------
Created an attachment (id=10598)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10598&action=view)
Testcase

Testcase including debug code for avr-studio 4. When the funtion 'Evaluate'
exits the program chrashes


-- 


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



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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
  2006-01-09 12:33 ` [Bug target/25722] " bl at rosetechnology dot dk
@ 2006-01-10 16:56 ` berndtrog at yahoo dot com
  2006-02-05 15:44 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: berndtrog at yahoo dot com @ 2006-01-10 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from berndtrog at yahoo dot com  2006-01-10 16:56 -------
Only 3.4.x seems allocate a frame pointer in the function 'Evaluate'.

It would be interesting if this bug can be triggered in 4.x!


-- 

berndtrog at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |berndtrog at yahoo dot com


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



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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
  2006-01-09 12:33 ` [Bug target/25722] " bl at rosetechnology dot dk
  2006-01-10 16:56 ` berndtrog at yahoo dot com
@ 2006-02-05 15:44 ` pinskia at gcc dot gnu dot org
  2010-07-19 12:56 ` anitha dot boyapati at atmel dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-05 15:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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


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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
                   ` (2 preceding siblings ...)
  2006-02-05 15:44 ` pinskia at gcc dot gnu dot org
@ 2010-07-19 12:56 ` anitha dot boyapati at atmel dot com
  2010-07-19 13:03 ` anitha dot boyapati at atmel dot com
  2010-07-19 13:44 ` eric dot weddington at atmel dot com
  5 siblings, 0 replies; 7+ messages in thread
From: anitha dot boyapati at atmel dot com @ 2010-07-19 12:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from anitha dot boyapati at atmel dot com  2010-07-19 12:56 -------

When I tried with AVR Studio 4.18, Build 684, the program didn't crash.

I think the issue is not with compiler. Disassembly looks proper and call to
Evaluate() is returned. This can be verified by using breakpoints in assembly
statements.

119:          Evaluate();
+0000023E:   940E0056    CALL      0x00000056     Call subroutine
+00000240:   CFFF        RJMP      PC-0x0000      Relative jump

However when I tried to put breakpoint for 'while' statement, it did not work
out as the corresponding source line couldn't be found in the program memory.
This differs from the expected behavior.


-- 

anitha dot boyapati at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anitha dot boyapati at atmel
                   |                            |dot com


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


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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
                   ` (3 preceding siblings ...)
  2010-07-19 12:56 ` anitha dot boyapati at atmel dot com
@ 2010-07-19 13:03 ` anitha dot boyapati at atmel dot com
  2010-07-19 13:44 ` eric dot weddington at atmel dot com
  5 siblings, 0 replies; 7+ messages in thread
From: anitha dot boyapati at atmel dot com @ 2010-07-19 13:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from anitha dot boyapati at atmel dot com  2010-07-19 13:03 -------
SSA pass pass_remove_useless_stmts() removes useless statements and any code
beyond statements like "while(1);" will not be generated. This might be why the
breakpoint at "while(TRUE);" in the testcase is not recognised [and hence the
simulation looks like hanged/or not returned from evaluate() ]


-- 


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


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

* [Bug target/25722] Stackpointer is not restored correct at end of function
  2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
                   ` (4 preceding siblings ...)
  2010-07-19 13:03 ` anitha dot boyapati at atmel dot com
@ 2010-07-19 13:44 ` eric dot weddington at atmel dot com
  5 siblings, 0 replies; 7+ messages in thread
From: eric dot weddington at atmel dot com @ 2010-07-19 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from eric dot weddington at atmel dot com  2010-07-19 13:43 -------
Closing as WORKSFORME based on comments #3, #4.


-- 

eric dot weddington at atmel dot com changed:

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


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


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

end of thread, other threads:[~2010-07-19 13:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-09 12:31 [Bug target/25722] New: Stackpointer is not restored correct at end of function bl at rosetechnology dot dk
2006-01-09 12:33 ` [Bug target/25722] " bl at rosetechnology dot dk
2006-01-10 16:56 ` berndtrog at yahoo dot com
2006-02-05 15:44 ` pinskia at gcc dot gnu dot org
2010-07-19 12:56 ` anitha dot boyapati at atmel dot com
2010-07-19 13:03 ` anitha dot boyapati at atmel dot com
2010-07-19 13:44 ` eric dot weddington at atmel dot com

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