[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference nicctr::kap-users

Title:Kuck Associates Preprocessor Users
Notice:KAP V2.1 (f90,f77,C) SSB-kits - see note 2
Moderator:HPCGRP::DEGREGORY
Created:Fri Nov 22 1991
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:390
Total number of notes:1440

375.0. "Invalid pointer reference: 0 at line 0" by PEACHS::MAXIE (Pat Lampert, UNIX Applications Support, 343-1050) Thu Apr 10 1997 11:12

I'm having probelems with the following code.  I know that 
flag1 and flag2 are uninitialized, but this is code from
a customer.  Anyone seen this before?



---------------------- 8< ------------------------------
/* main.c */
int flag1, flag2;
int *ptr1 = &flag1;
int *ptr2 = &flag2;

main ()
{
    int j,k;

    for (j=0; j < 3; j++) {
        for (k=0; k < 3; k++) {
            if (*ptr1) *ptr2 = 1;
        }
    }
}
----------------------- 8< -----------------------------
$ uname -a
OSF1 cdeman.alf.dec.com V4.0 464 alpha


$ kcc main.c
 KAP/Digital_UA_C   3.1 k271904 961113     10-Apr-1997   09:06:38
 ***** Invalid pointer reference: 0 at line     0


 *** while processing routine main

 *** Version 3.1 k271904 961113

 KAP -- Fatal Error
T.RTitleUserPersonal
Name
DateLines
375.1This is a bugHPCGRP::DEGREGORYKaren 223-5801Mon Apr 14 1997 11:451
This is a bug in KAP C.  I have sent it to KAI.