This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
/cygdrive/c/sf/gcc-build/./gcc/xgcc -B/cygdrive/c/sf/gcc-build/./gcc/ -B/usr/local/i686-pc-cygwin/bin/ -B/usr/local/i686-pc-cygwin/lib/ -isystem /usr/local/i686-pc-cygwin/include -isystem /usr/local/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2 -I. -I../../../gcc/libiberty/../include -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes ../../../gcc/libiberty/regex.c -o regex.o ../../../gcc/libiberty/regex.c:128: warning: function declaration isn't a prototype ../../../gcc/libiberty/regex.c:128: warning: conflicting types for built-in function 'malloc' ../../../gcc/libiberty/regex.c:129: warning: function declaration isn't a prototype In file included from ../../../gcc/libiberty/../include/xregex.h:26, from ../../../gcc/libiberty/regex.c:191: ../../../gcc/libiberty/../include/xregex2.h:538: warning: ISO C90 does not support 'static' or type qualifiers in parameter array declarators In file included from ../../../gcc/libiberty/regex.c:636: ../../../gcc/libiberty/regex.c: In function 'byte_regex_compile': ../../../gcc/libiberty/regex.c:2437: warning: implicit declaration of function 'free' ../../../gcc/libiberty/regex.c: In function 'byte_compile_range': ../../../gcc/libiberty/regex.c:4485: warning: signed and unsigned type in conditional expression ../../../gcc/libiberty/regex.c:4495: warning: signed and unsigned type in conditional expression ../../../gcc/libiberty/regex.c:4495: warning: signed and unsigned type in conditional expression ../../../gcc/libiberty/regex.c: In function 'byte_re_compile_fastmap': ../../../gcc/libiberty/regex.c:4833: warning: implicit declaration of function 'abort' ../../../gcc/libiberty/regex.c:4833: warning: incompatible implicit declaration of built-in function 'abort' ../../../gcc/libiberty/regex.c: In function 'byte_re_match_2_internal': ../../../gcc/libiberty/regex.c:7419: warning: incompatible implicit declaration of built-in function 'abort' ../../../gcc/libiberty/regex.c: In function 'xre_comp': ../../../gcc/libiberty/regex.c:7817: warning: return discards qualifiers from pointer target type ../../../gcc/libiberty/regex.c: In function 'xregerror': ../../../gcc/libiberty/regex.c:8076: warning: incompatible implicit declaration of built-in function 'abort' ../../../gcc/libiberty/regex.c: In function 'byte_regex_compile': ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: error: invariant not recomputed when ADDR_EXPR changed &_ctype_D.1871[1]; ../../../gcc/libiberty/regex.c:2283: internal compiler error: verify_stmts failed. Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [regex.o] Error 1 make[2]: Leaving directory `/cygdrive/c/sf/gcc-build/i686-pc-cygwin/libiberty' make[1]: *** [all-target-libiberty] Error 2 make[1]: Leaving directory `/cygdrive/c/sf/gcc-build' make: *** [bootstrap] Error 2
Environment: latest cygwin on winxp.
Can you provide the preprocessed source for the failing file?
Created an attachment (id=8973) [edit] regex.i regex.i was generated after i switched on -save-temps
This is related to the dllimport PRs. Confirmed, reduced testcase: extern const __attribute__((dllimport)) char _ctype_[]; char *f(void) { return _ctype_; }
*** Bug 21878 has been marked as a duplicate of this bug. ***
Giovanni, Pinskia, Any updates on this bug? thanks, dims
as I posted in the duplicated bug thread, the problematic directories are: target-libiberty target-libstdc++-v3 also I had a working build on cvs snapshot of 20050522, btw in that build ATTRIBUTE_SENTINEL was not defined when building libiberty on mingw, and also gcov has to be fixed since it has a mkdir with 2 params, on win32 it has only one param, but I've easy solved these problems. I'll spend some time to check when exactly the build was broken
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02945.html>.
Your patches doesn't clean apply to current cvs, I've revised it but I've renamed DECL_NON_ADDR_CONST_P in TARGET_DECL_NON_ADDR_CONST_P in varasm.c since there is no reference for DECL_NON_ADDR_CONST_P in code, also I've noticed that in libgcov.c the mkdir substituion doesn't take place so mingw gives an error about mkdir taking 2 args instead of one. I'm attaching the new patch, please take a look
Created an attachment (id=9031) [edit] Revised patch
(In reply to comment #9) > also I've noticed that in libgcov.c the mkdir substituion doesn't take place so > mingw gives an error about mkdir taking 2 args instead of one. That is PR 21597.
*** Bug 21919 has been marked as a duplicate of this bug. ***
*** Bug 21938 has been marked as a duplicate of this bug. ***
*** Bug 21989 has been marked as a duplicate of this bug. ***
> I'm attaching the new patch, please take a look Attached patch does not apply cleanly on today's CVS. However, when failing hunks are integrated manually, the source then builds cleanly (languages=c,f95 ; regtested on i686-pc-cygwin).
Created an attachment (id=9074) [edit] Patch revised version 2 This applies to current cvs, tested on linux cross
I didn't see this patch proposed on gcc-patches. Is someone reviewing it? Since it prevents building cygwin and mingw, one could hope that it gets committed soon...
The patch is still not correct. It doesn't handle dllimport override semantics. See g++.dg/ext/dllimport-3.C which fails because TREE_INVARIANT and TREE_CONSTANT change when we lose the dllimport attribute. That can be "fixed" by modifying recompute_tree_invariant_for_addr_expr to special-case dllimports, but this is getting a bit hackish to me. In many ways dllimports are like DECL_THREAD_LOCAL. However, thread-local attribute can't get overridden, while dllimport attribute can. Also this part of the revised patch is wrong. It should be targetm.decl_non_addr_const_p --- gcc/varasm.c 8 Jun 2005 00:15:53 -0000 1.513 +++ gcc/varasm.c 12 Jun 2005 04:32:36 -0000 @@ -3608,7 +3608,7 @@ if (value && TREE_CODE (value) == FUNCTION_DECL && ((decl_function_context (value) && !DECL_NO_STATIC_CHAIN (value)) - || DECL_NON_ADDR_CONST_P (value))) + || TARGET_DECL_NON_ADDR_CONST_P (value))) return NULL_TREE; return value;
can you provide a correct patch? I've just adapted the old one to apply and compile
Any updates on this one? Since mingw and cygwin builds are broken, I think something should be done soon. Be it a proper patch or a temporary hack, that should be decided by the cygwin/mingw maintainers (Christopher Faylor and Danny Smith, if I'm not mistaken).
Created an attachment (id=9152) [edit] As suggested by Danny Smith, but it only fixes targetm.decl_non_addr_const_p not dllimport override semantics
Is the just released 4.0.1 on another branch? is that working? -- dims
(In reply to comment #22) > Is the just released 4.0.1 on another branch? is that working? Yes and yes (well bootstrap is).
Mainline is still broken for cygwin as of the gcc-4.1-20050723 snapshot. Applying patch-rev3.diff (with failing hunks applied by hand) seems to fix the problem.
*** Bug 23340 has been marked as a duplicate of this bug. ***
Created an attachment (id=9544) [edit] Still incomplete but compiles Still incomplete but compiles
*** Bug 23535 has been marked as a duplicate of this bug. ***
The patch still broken it fails to compiles some resources i.e. building reactos
Updated patch here. http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00565.html Danny
Subject: Bug 21766 CVSROOT: /cvs/gcc Module name: gcc Changes by: dannysmith@gcc.gnu.org 2005-10-12 20:54:50 Modified files: gcc : ChangeLog config.gcc tree.c tree.h varasm.c target.h target-def.h gcc/doc : tm.texi gcc/config/i386: i386-protos.h i386.c winnt.c cygming.h t-cygming gcc/cp : ChangeLog class.c gcc/testsuite : ChangeLog gcc/testsuite/gcc.dg: dll-2.c dll-3.c dll-4.c gcc/testsuite/g++.dg/ext: dllimport1.C dllimport2.C dllimport3.C dllimport7.C dllimport8.C dllimport9.C Added files: gcc/config/i386: winnt-stubs.c winnt-cxx.c Log message: PR middle-end/21275 PR middle-end/21766 * target.h (struct gcc_target): Add valid_dllimport_attribute_p target hook. (struct cxx): Add adjust_class_at_definition target hook. * target-def.h: (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): New define, defaulting to hook_bool_tree_true. Add to TARGET_INITIALIZER (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): New define, defaulting to hook_void_tree. Add to TARGET_CXX. * tree.h (struct decl_with_vis): Rename non_addr_const_p field to dllimport_flag. (DECL_NON_ADDR_CONSTANT_P): Replace with DECL_DLLIMPORT_P macro. * tree.c (merge_dllimport_decl_attributes): Check DECL_DLLIMPORT_P instead of attribute. Check for dllexport override. Warn if inconsistent dll linkage. Don't lose old dllimport if decl has had address referenced. Tweak lookup of dllimport atribute. (handle_dll_attribute): Check targetm.valid_dllimport_attribute_p for target specific rules. Don't add dllimport attribute if DECL_DECLARED_INLINE_P. Set DECL_DLLIMPORT_P when adding dllimport attribute. (staticp): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P. * varasm.c (initializer_constant_valid_p): Replace DECL_NON_ADDR_CONSTANT_P with DECL_DLLIMPORT_P PR target/21801 PR target/23589 * config.gcc (i[34567]86-*-cygwin*): Add winnt-cxx.o to 'cxx_target_objs', winnt-stubs,o to 'extra_objs'. (i[34567]86-*-mingw32*): Likewise. * doc/tm.texi (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Document. (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Document. * config/i386/winnt.c (i386_pe_dllimport_p): Factor out C++-specific code. Change return value to bool. (i386_pe_dllimport_p): Likewise. (associated_type): Simplify and make language-independent (i386_pe_encode_section_info): Replace override of ambiguous dllimport symbol refs with a gcc_assert. (i386_pe_valid_dllimport_attribute_p): Define. * config/i386/winnt-cxx.c: New file. Define C++ versions of i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, i386_pe_adjust_class_at_definition. * config/i386/winnt-stubs.c: New file. Define stub versions of lang-specific functions. * config/i386/i386-protos.h: Declare winnt-[cxx|stubs].c functions i386_pe_type_dllimport_p, i386_pe_type_dllexport_p, i386_pe_adjust_class_at_definition. (i386_pe_valid_dllimport_attribute_p): Declare. * config/i386/cygming.h (TARGET_VALID_DLLIMPORT_ATTRIBUTE_P): Define. (TARGET_CXX_ADJUST_CLASS_AT_DEFINITION): Define. * config/i386/t-cygming: Add rules for winnt-cxx.o, winnt-stubs.o. PR target/19704 * config/i386/i386.c (ix86_function_ok_for_sibcall): Replace test for dllimport attribute with test of DECL_DLLIMPORT_P. cp PR target/21801 PR target/23589 * class.c (finish_struct_1): Call targetm.cxx.adjust_class_at_definition. testsuite * gcc.dg/dll-2.c: Add tests for warnings. * gcc.dg/dll-3.c: Likewise. * gcc.dg/dll-4.c: Likewise. * g++.dg/ext/dllimport1.C: Adjust tests for warnings. * g++.dg/ext/dllimport2.C: Likewise. * g++.dg/ext/dllimport3.C: Likewise. * g++.dg/ext/dllimport7.C: Likewise. * g++.dg/ext/dllimport8.C: Likewise. * g++.dg/ext/dllimport9.C: Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10149&r2=2.10150 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?cvsroot=gcc&r1=1.568&r2=1.569 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.508&r2=1.509 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.757&r2=1.758 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.532&r2=1.533 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target.h.diff?cvsroot=gcc&r1=1.144&r2=1.145 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target-def.h.diff?cvsroot=gcc&r1=1.133&r2=1.134 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/tm.texi.diff?cvsroot=gcc&r1=1.446&r2=1.447 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt-stubs.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt-cxx.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386-protos.h.diff?cvsroot=gcc&r1=1.147&r2=1.148 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.862&r2=1.863 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/winnt.c.diff?cvsroot=gcc&r1=1.84&r2=1.85 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/cygming.h.diff?cvsroot=gcc&r1=1.32&r2=1.33 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/t-cygming.diff?cvsroot=gcc&r1=1.3&r2=1.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4927&r2=1.4928 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.734&r2=1.735 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6183&r2=1.6184 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/dll-2.c.diff?cvsroot=gcc&r1=1.7&r2=1.8 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/dll-3.c.diff?cvsroot=gcc&r1=1.5&r2=1.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/dll-4.c.diff?cvsroot=gcc&r1=1.5&r2=1.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport1.C.diff?cvsroot=gcc&r1=1.3&r2=1.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport2.C.diff?cvsroot=gcc&r1=1.3&r2=1.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport3.C.diff?cvsroot=gcc&r1=1.2&r2=1.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport7.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport8.C.diff?cvsroot=gcc&r1=1.2&r2=1.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/dllimport9.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
Fixed on trunk. http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00474.html Danny
(In reply to comment #31) > Fixed on trunk. > http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00474.html > Danny Danny, you should be able to modify the bugs using this accont now.