This is the mail archive of the gcc-help@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]

Help with -fdump-translation-unit option


I am trying to use the tree output from the gcc compiler for C source.
There is a parameter called -fdump-translation-unit that is supposed to
do this, but I have not been able to make it work.

/usr/local/bin/gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc-3.0/configure --prefix=/usr/bin : (reconfigured) ../gcc-3.0/configure --prefix=/usr : (reconfigured) ../gcc-3.0/configure 
Thread model: single
gcc version 3.0

uname -a
Linux cchan 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown

Here is the C file I tried to use:

cchan.2.207% cat tester.c
struct tst {
   int a;
   double b;
};

int main() {
   struct tst x;
   x.a = 1;
   x.b = 1.2;
   return 0;
}

I tried the following:
/usr/local/bin/gcc -fdump-translation-unit-1 tester.c

It produced an a.out file, but no tester.tu file.  I tried
many other variations of the above:

  -fdump-translation-unit  (Contrary to the documentation, this is an error)
  -fdump-translation-unit-1=tester
  -fdump-translation-unit-1=tester.c
  -fdump-translation-unit-1=tester.tu
  -drx -fdump-translation-unit-1

Is there a combination of options required to make this work?  Thanks for your
help.


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