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/13828] access to local array in while loop is optimized away


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-23 16:19 -------
Can you stop opening a new bug for an invalid bug.
This is invalid as you are incrementing and acessing current without going through a sequence 
point:
    localArray[current]=localArray[++current];
This is undefined.
This can be evaluated as:
current++;
 localArray[current]=localArray[current];
or
temp = &  localArray[current];
current++;
 *temp = localArray[current];

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|access to local array in    |access to local array in
                   |while loop is optimized away|while loop is optimized away


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


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