This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: Legal c program Segv's (Nevermind)
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: RE: Legal c program Segv's (Nevermind)
- From: Ed Connell <Ed dot Connell at sas dot com>
- Date: Mon, 19 Jun 2000 18:42:46 -0400
Nevermind. I made a stupid mistake. There is no bug.
I was paring down the compile line of a module and made it a stand alone program. Stand alone programs don't use -shared. Sorry for wasting everybody's time.
> -----Original Message-----
> From: Ed Connell
> Sent: Monday, June 19, 2000 3:31 PM
> To: 'gcc-bugs@gcc.gnu.org'
> Subject: Legal c program Segv's
>
> The following program SEGV's immediately when compiled with -shared. (When compiled without -shared it is an infinite loop which is apparently correct (although counterintuitive)) You can't run it in gdb at all. This happens on the 000614 image as well as older ones.
>
> Should you need to contact me, please email me directly...I am not on the mailing list.
>
> Thanks
> Ed Connell
>
> gcc toy.c -g -o toy_segv -shared
>
> toy.c
> *********************
> enum
> {
> doc_root_dir,
> doc_sys_dir,
> doc_systitle_dir,
> doc_title_dir,
> doc_data_dir,
> doc_bygroup_dir,
> doc_page_dir,
> doc_obj_dir,
>
> DOC_NUM_DIRS
> };
>
>
> int main() {
> int i;
>
> for (i=doc_obj_dir; i >= doc_root_dir; i--) {
> printf("%d\n", i);
> }
> return 0;
> }