During a mainline bootstrap with Ada included (and the patch from PR
tree-optimization/21029 to avoid an infinite loop in stage3) on Tru64 UNIX,
there occur many warnings like this:

% stage1/xgcc -Bstage1/ -B/vol/gcc/share/alpha-dec-osf5.1b/bin/ -c -g -O2      
-gnatpg -gnata -I- -I. -Iada -I/vol/gnu/src/gcc/gcc-dist/gcc/ada 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/cstand.adb -o ada/cstand.o
<built-in>:0: warning: 'const' attribute directive ignored
<built-in>:0: warning: 'nothrow' attribute directive ignored
[...]

The warnings stem from from gcc/attribs.c (decl_attributes), e.g. (first
call to decl_attributes):

<built-in>:0: warning: 'const' attribute directive ignored
<built-in>:0: warning: 'nothrow' attribute directive ignored
0x000000012016fadc in builtin_function (name=0x14008b7d8 
"__builtin_alpha_implver", type=0x3b6c0, function_code=26, class=BUILT_IN_MD, 
library_name=0x0, attrs=0x15bc0) at 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/utils.c:1788

#0  decl_attributes (node=0x11fffbeb8, attributes=0x15bc0, flags=16) at 
/vol/gnu/src/gcc/gcc-dist/gcc/attribs.c:173
#1  0x000000012016fadc in builtin_function (name=0x14008b7d8 
"__builtin_alpha_implver", type=0x3b6c0, function_code=26, class=BUILT_IN_MD, 
library_name=0x0, attrs=0x15bc0) at 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/utils.c:1788
#2  0x00000001206e7264 in alpha_init_builtins () at 
/vol/gnu/src/gcc/gcc-dist/gcc/config/alpha/alpha.c:6271
#3  0x0000000120163eb8 in gnat_install_builtins () at 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/utils.c:418
#4  0x0000000120163e6c in gnat_init_decl_processing () at 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/utils.c:406
#5  0x000000012015f5ac in gnat_init () at 
/vol/gnu/src/gcc/gcc-dist/gcc/ada/misc.c:400
#6  0x0000000120644200 in lang_dependent_init (name=0x11fffe120 
"ada/sdefault.adb") at /vol/gnu/src/gcc/gcc-dist/gcc/toplev.c:2017
#7  0x000000012064457c in do_compile () at 
/vol/gnu/src/gcc/gcc-dist/gcc/toplev.c:2122
#8  0x0000000120644640 in toplev_main (argc=10, argv=0x11fffc018) at 
/vol/gnu/src/gcc/gcc-dist/gcc/toplev.c:2155
#9  0x00000001205e6a38 in main (argc=10, argv=0x11fffc018) at 
/vol/gnu/src/gcc/gcc-dist/gcc/main.c:35

They originate from this patch:

2005-03-08  Richard Henderson  <[EMAIL PROTECTED]>

        * config/alpha/alpha.c (code_for_builtin): Replace special-case
        builtin codes with ctzdi2, clzdi2, popcountdi2.
        (struct alpha_builtin_def): Add is_const.
        (zero_arg_builtins, one_arg_builtins, two_arg_builtins): Init it.
        (alpha_v8qi_u, alpha_v8qi_s, alpha_v4hi_u, alpha_v4hi_s): New.
        (alpha_init_builtins): Init them.  Set nothrow and const attributes
        on builtins.

and occur even with a minimal Ada test program:

procedure conftest is begin null; end conftest;

stage1/gnat1 -I/vol/gnu/src/gcc/gcc-dist/gcc/ada conftest.adb

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha
        
host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gnu/src/gcc/gcc-dist/configure --prefix=/vol/gcc 
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build 
alpha-dec-osf5.1b --target alpha-dec-osf5.1b 
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3 --with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3 
--enable-languages=c,c++,f95,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap the compiler as above (which fails building gnattools due to PR
ada/18434).

-- 
           Summary: Many attribute directive ignored warnings during Tru64
                    UNIX Ada bootstrap
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at techfak dot uni-bielefeld dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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

Reply via email to