I'm currently writing a small kernel, and gcc asked me to file a bug report.
I've scrapped the file from anything not directly related to the bug, which
makes it quite small.
I'm aware the assembly syntax is most likely wrong.
Hope this is useful.


Command line :
##############
gcc -v -save-temps -nostdinc -masm=intel -Wall interrupt.c

Output :
########
Utilisation des specs internes.
Cible : i486-linux-gnu
Configuré avec: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Modèle de thread: posix
version gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
 /usr/lib/gcc/i486-linux-gnu/4.2.4/cc1 -E -quiet -nostdinc -v interrupt.c
-masm=intel -mtune=generic -Wall -fpch-preprocess -o interrupt.i
la recherche pour #include "..." débute ici :
la recherche pour #include <...> débute ici:
Fin de la liste de recherche.
 /usr/lib/gcc/i486-linux-gnu/4.2.4/cc1 -fpreprocessed interrupt.i -quiet
-dumpbase interrupt.c -masm=intel -mtune=generic -auxbase interrupt -Wall
-version -fstack-protector -fstack-protector -o interrupt.s
GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) (i486-linux-gnu)
        compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
heuristiques GGC: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e2971cf2189271aeeb10133511ecea3a
interrupt.c: Dans la fonction «f» :
interrupt.c:5: erreur interne du compilateur: dans print_operand, à
config/i386/i386.c:7961
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <URL:http://gcc.gnu.org/bugs.html> pour plus de détail.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

source code :
#############
<------- interrupt.c --------->
struct{}i;
void f() {
        __asm__("sidt %0\n"
                : "=m" (i));
}
<----------------------------->


-- 
           Summary: -masm=intel, struct output for __asm__() block causes
                    gcc to ask for bug report.
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vbernetr at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38521

Reply via email to