This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/15114] [3.4/3.5 regression] -funit-at-a-time causes compilation of functions with variable length arrays to fail


------- Additional Comments From bangerth at dealii dot org  2004-04-25 13:38 -------
Here's a simple testcase: 
--------------- 
void foo (int n, double a[n][n]) {} 
void bar (int n, double a[n][n]) {} 
--------------- 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c a.i  
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c -O2 a.i  
a.i: In function `foo': 
a.i:2: error: prior parameter's size depends on 'n' 
a.i:2: error: prior parameter's size depends on 'n' 
 
One actually needs two function definitions, and as has previously 
been observed: the error message refers to function 'foo', but 
prints line 2, which is in function 'bar'. This leads me to 
speculate that unit-at-a-time somehow manages to confuse the 
arguments of the two function declarations. 
 
Jan, this is your field, would you mind taking a look? 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
          Component|c                           |optimization
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.4
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-25 13:38:16
               date|                            |
            Summary|-funit-at-a-time causes     |[3.4/3.5 regression] -funit-
                   |compilation of functions    |at-a-time causes compilation
                   |with variable length arrays |of functions with variable
                   |to fail                     |length arrays to fail
   Target Milestone|---                         |3.4.1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]