[Bug c/14726] large array/struct initializer goes in wrong section

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Thu Mar 25 13:49:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-03-25 13:49 -------
The duplicate I was talking about is PR 12814. I verified that for 
this snippet: 
------------------- 
int f(int i) { 
  int x[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14 }; 
  return x[i]; 
} 
------------------- 
we get this code on tree-ssa: 
------------------- 
	.file	"x.cc" 
	.section	.rodata 
	.align 32 
	.type	_ZZ1fiE3C.0, @object 
	.size	_ZZ1fiE3C.0, 56 
_ZZ1fiE3C.0: 
	.long	1 
	.long	2 
	.long	3 
	.long	4 
	.long	5 
	.long	6 
	.long	7 
	.long	8 
	.long	9 
	.long	10 
	.long	11 
	.long	12 
	.long	13 
	.long	14 
	.text 
	.align 2 
	.p2align 4,,15 
.globl _Z1fi 
	.type	_Z1fi, @function 
_Z1fi: 
... 
--------------------- 
Note that the constant is in .rodata 
 
W. 

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

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


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



More information about the Gcc-bugs mailing list