Hi,

compiling command is:
opencc -Wunused -IPA:cprop=off -IPA:dce=off -WOPT:ivar_pre=off 
-WOPT:icopy=off:copy=off  -Wb,-tt32:0x00000400  -O0 --vv   hello.c

The input is:

#include<stdio.h>
#define N 100

int main()
{
  int i, j, k;
  i = 0;
  k = 0;
  int a[N];
  for( j = 0; j < N; j++)
    a[j] = j + 4;
  return 0;
}


The output is:(there were no i and k)
#include "hello.w2c.h"


extern _INT32 main()
{

  _INT32 j;
  _INT32 a[100LL];

  j = 0;
  while(j <= 99)
  {
    _514 :;
    (a)[j] = j + 4;
    j = j + 1;
    _258 :;
  }
  goto _770;
  _770 :;
  return 0;
} /* main */


  ----- Original Message ----- 
  From: Chandrasekhar Murthy 
  To: Shin-Ming Liu ; eirc.lew 
  Cc: open64-devel@lists.sourceforge.net 
  Sent: Thursday, June 09, 2011 4:34 AM
  Subject: RE: [Open64-devel] How can I stop open64 delete unused code


  In the MIPSpro compilers they would be removed in the frontend.
  You might want to check where it gets removed starting from the frontend.

  Murthy


  From: Shin-Ming Liu [mailto:shinm...@gmail.com] 
  Sent: Wednesday, June 08, 2011 8:46 AM
  To: eirc.lew
  Cc: open64-devel@lists.sourceforge.net
  Subject: Re: [Open64-devel] How can I stop open64 delete unused code

  Do you mean the compiler does not reserve space on the stack?  The place to 
look at is the data layout component in CG.  Should be simple to keep them with 
simple change.

  Shin
  On Wed, Jun 8, 2011 at 6:11 AM, eirc.lew <eirc....@gmail.com> wrote:
  Hi, all

    a example(main.c) as follow:

  int main()
  {
    int sum;
    int i, j, k;
    for( i = 0; i < 100; i++ )
      sum = i + 9;

    return 0;
   }

   when I compile it: opencc -CLIST:: main.c

   In the file main.w2c.c, there are no j and k, but I need them.Does someone 
know how to do?

  Thanks!

  Eric

  ------------------------------------------------------------------------------
  EditLive Enterprise is the world's most technically advanced content
  authoring tool. Experience the power of Track Changes, Inline Image
  Editing and ensure content is compliant with Accessibility Checking.
  http://p.sf.net/sfu/ephox-dev2dev
  _______________________________________________
  Open64-devel mailing list
  Open64-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/open64-devel

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to