public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32874]  New: Strange global register allocation, depends on order of functions
@ 2007-07-24  8:48 ecd at brainaid dot de
  2007-07-24  8:51 ` [Bug c/32874] " ecd at brainaid dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:48 UTC (permalink / raw)
  To: gcc-bugs

I have 3 global register variables, 1 pointer to a struct and 2 unsigned
integers. Next I have 2 functions, each working on the pointer and on one of
the integers. The generated output looks strange in the first place, and is
dependant on the order of the two functions in the input .c file.


-- 
           Summary: Strange global register allocation, depends on order of
                    functions
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ecd at brainaid dot de
 GCC build triplet: sparc-linux-gnu
  GCC host triplet: sparc-linux-gnu
GCC target triplet: sparc-linux-gnu


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


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

* [Bug c/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
@ 2007-07-24  8:51 ` ecd at brainaid dot de
  2007-07-24  8:52 ` ecd at brainaid dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ecd at brainaid dot de  2007-07-24 08:51 -------
Created an attachment (id=13955)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13955&action=view)
Input file to trigger the problem


-- 


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


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

* [Bug c/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
  2007-07-24  8:51 ` [Bug c/32874] " ecd at brainaid dot de
  2007-07-24  8:52 ` ecd at brainaid dot de
@ 2007-07-24  8:52 ` ecd at brainaid dot de
  2007-07-24  8:53 ` ecd at brainaid dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ecd at brainaid dot de  2007-07-24 08:52 -------
Created an attachment (id=13956)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13956&action=view)
Input file to trigger the problem with order of functions reversed


-- 


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


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

* [Bug c/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
  2007-07-24  8:51 ` [Bug c/32874] " ecd at brainaid dot de
@ 2007-07-24  8:52 ` ecd at brainaid dot de
  2007-07-24  8:52 ` ecd at brainaid dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ecd at brainaid dot de  2007-07-24 08:52 -------
Created an attachment (id=13957)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13957&action=view)
Output number 1


-- 


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


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

* [Bug c/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
                   ` (2 preceding siblings ...)
  2007-07-24  8:52 ` ecd at brainaid dot de
@ 2007-07-24  8:53 ` ecd at brainaid dot de
  2007-07-24  8:54 ` ecd at brainaid dot de
  2010-09-20 22:20 ` [Bug middle-end/32874] " ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ecd at brainaid dot de  2007-07-24 08:53 -------
Created an attachment (id=13958)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13958&action=view)
Output number 2 (function order reversed)


-- 


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


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

* [Bug c/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
                   ` (3 preceding siblings ...)
  2007-07-24  8:53 ` ecd at brainaid dot de
@ 2007-07-24  8:54 ` ecd at brainaid dot de
  2010-09-20 22:20 ` [Bug middle-end/32874] " ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ecd at brainaid dot de @ 2007-07-24  8:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ecd at brainaid dot de  2007-07-24 08:54 -------
Command line to compile the samples:

gcc -Wall -O2   -ffixed-i0 -ffixed-i1 -ffixed-i2 -ffixed-i3    
-fno-strict-aliasing    -fno-delayed-branch     -fno-reorder-blocks    
-fno-optimize-sibling-calls -Wa,-Av9a -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -save-temps -da      -c op.c -o op.o

gcc -v output:

Using built-in specs.
Target: sparc-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-cpu=v8 --enable-checking=release
sparc-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


-- 


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


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

* [Bug middle-end/32874] Strange global register allocation, depends on order of functions
  2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
                   ` (4 preceding siblings ...)
  2007-07-24  8:54 ` ecd at brainaid dot de
@ 2010-09-20 22:20 ` ebotcazou at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-09-20 22:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ebotcazou at gcc dot gnu dot org  2010-09-20 22:20 -------
Not a bug.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2010-09-20 22:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-24  8:48 [Bug c/32874] New: Strange global register allocation, depends on order of functions ecd at brainaid dot de
2007-07-24  8:51 ` [Bug c/32874] " ecd at brainaid dot de
2007-07-24  8:52 ` ecd at brainaid dot de
2007-07-24  8:52 ` ecd at brainaid dot de
2007-07-24  8:53 ` ecd at brainaid dot de
2007-07-24  8:54 ` ecd at brainaid dot de
2010-09-20 22:20 ` [Bug middle-end/32874] " ebotcazou 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).