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]
Other format: [Raw text]

Re: Turning on optimizations borg my programs


On 07/09/2010 01:43 PM, M.C.A. (Marco) Devillers wrote:

> I am writing a compiler and it seems to work somewhat. I use C as my
> target assembly language.
> 
> Now I get working programs if I just compile them, but my programs
> borg after I compile them with -03.
> 
> The compiled programs are too big too publish here, but I wonder if
> anyone has any clue on how to debug this? I do some hefty pointer
> arithmetic on (sometimes static) arrays of integers and make a lot of
> libffi calls. It may be that the pointer arithmetic is uncleanly
> defined/optimized away?
> 
> How can I test this? What compiler switches should I try first?

I'm assuming you're working on a GNU/Linux system.  Use Valgrind.

Andrew.


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