
Intro
=====

This is a stripped down gcc problem that was taken from compiling binutils 2.25. The problem occurs when 'make' compiles the as.c in the gas folder. Basically the compiler has access to two 'config.h', one in the local directory, the second in the bfd folder. The problem is the preprocessor include the wrong file in the bfd folder. This problem occurs several times when building binutils. A similar problem also occurs when compiling gcc with make, when building libgfortran it invorrectly includes the config.h in the gcc folder instead of the config.h in the local folder. This error does not occur with older compilers.

This error occurs in gcc version 4.8.3 and 4.9.3.

How to reproduce the error
==========================

The steps to reproduce the error in this stripped version are as follows:

cd gas
./compile.sh

Then you should get the incorrect output:
-----------------------------------------

In file included from ./../include/alloca-conf.h:2:0,
                 from as.h:2,
                 from as.c:2:
../bfd/config.h:2:2: warning: #warning "You have included the wrong header" [-Wcpp]
 #warning "You have included the wrong header"
  ^

If/When the bug is fixed the correct output would be:
-----------------------------------------------------

In file included from ./../include/alloca-conf.h:2:0,
                 from as.h:2,
                 from as.c:2:
../bfd/config.h:2:2: warning: #warning "You have included the correct include file" [-Wcpp]
 #warning "You have included the wrong header"
  ^

