I finally got some sort of error checking working for ATI cards.  The errors are weird. 
glGetShaderInfoLog(...) for each part of the program spits out:
Vertex shader was successfully compiled to run on hardware.
Fragment shader was successfully compiled to run on hardware.

But strangely, glGetInfoLogARB(...) spits out:

Fragment shader(s) failed to link, vertex shader(s) linked.
Fragment Shader not supported by HW

Needless to say, it crashes later on
glUseProgramObjectARB(...) with an 'invalid operation'.
These problems occur when certain functions are called in my program.  Here's a function that causes such an error:
float diffuse_coefficient(int lightnum) {
    vec3 l = normalize(gl_LightSource[lightnum].position.xyz-vVertex);
    return max(dot(normal,l),0.0);

My ideas:
vVertex is a varying vec3.  Could this be the problem?
is max(dot(normal,l),0.0) too much for one line?  I saw something about ALU limits.  I don't know if this qualifies. 

Any other ideas?  What's going on here?  How can I make this work?