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: my program compiled by GCC crashed


Hi Andrew,

Thanks a lot for your reply.

Yeah, I agree with you.  There may be something wrong with
libicuio.so.3 or something else.

But we can not say it is nothing to do with GCC. I changed the
compiler from g++ to gcc(of course, I also changed to use stdio.h and
printf), then the core dump went away. With the same code and same
options for the comiler, when I went back to g++, it still cored.  How
can we explain that?


Thanks,
James

2009/12/11 Andrew Haley <aph@redhat.com>:
> 王克驰 wrote:
>> Hi gcc-help,
>>
>> Our system crashed which was compiled by GCC. While, we can not say
>> that GCC compiler is the root cause.
>>
>> But the strange thing is that I created a sample test code and
>> compiled it with GCC. It worked fine when I chose O0 as the
>> optimization level but it crashed when I chose other optimization
>> levels.
>>
>> It did not crashed when I used SUN CC compiler no matter which
>> optimization level I chose.
>>
>> Below please find my test code and Makefile. The code is very simple
>> and the only thing I did is let it link to a library
>> /usr/lib/64/libicuio.so.3.
>
> This works for me on Linux, so I guess the problem is something to do
> with Solaris, perhaps libicuio.so.3, whatever that is.
>
> Andrew.
>


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