[Bug ada/71911] [Cygwin] "gnatclean program" will remove the standard package .ali file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71911 --- Comment #4 from 鍾 --- (In reply to Eric Botcazou from comment #3) > > I use the administrator user and administrator permissions in Windows host, > > so, normally I use the same permission map to root permissions in Cygwin > > host. > > Please double check the permissions of the ALI files, they should be > read-only. -rw-r--r-- 1 Administrator None 1.7K 六月 14 00:12 a-assert.ali -rw-r--r-- 1 Administrator None 16K 六月 14 00:12 a-btgbso.ali -rw-r--r-- 1 Administrator None 2.7K 六月 14 00:12 a-calari.ali -rw-r--r-- 1 Administrator None 4.2K 六月 14 00:12 a-calcon.ali -rw-r--r-- 1 Administrator None 3.3K 六月 14 00:12 a-caldel.ali -rw-r--r-- 1 Administrator None 20K 六月 14 00:12 a-calend.ali -rw-r--r-- 1 Administrator None 15K 六月 14 00:12 a-calfor.ali -rw-r--r-- 1 Administrator None 2.0K 六月 14 00:12 a-catizo.ali -rw-r--r-- 1 Administrator None 38K 六月 14 00:12 a-cbdlli.ali I am the Administrator.
[Bug ada/71911] [Cygwin] "gnatclean program" will remove the standard package .ali file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71911 --- Comment #6 from 鍾 --- (In reply to Eric Botcazou from comment #5) > > -rw-r--r-- 1 Administrator None 1.7K 六月 14 00:12 a-assert.ali > > -rw-r--r-- 1 Administrator None 16K 六月 14 00:12 a-btgbso.ali > > -rw-r--r-- 1 Administrator None 2.7K 六月 14 00:12 a-calari.ali > > -rw-r--r-- 1 Administrator None 4.2K 六月 14 00:12 a-calcon.ali > > -rw-r--r-- 1 Administrator None 3.3K 六月 14 00:12 a-caldel.ali > > -rw-r--r-- 1 Administrator None 20K 六月 14 00:12 a-calend.ali > > -rw-r--r-- 1 Administrator None 15K 六月 14 00:12 a-calfor.ali > > -rw-r--r-- 1 Administrator None 2.0K 六月 14 00:12 a-catizo.ali > > -rw-r--r-- 1 Administrator None 38K 六月 14 00:12 a-cbdlli.ali > > OK, that's the bug, there should be no 'w' at all. > > You need to find out what happens during 'make install', the Makefile issues: > > $(CHMOD) a-wx $(RTSDIR)/*.ali Thanks.
[Bug fortran/71592] New: Add some facilities for compile-time check
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71592 Bug ID: 71592 Summary: Add some facilities for compile-time check Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: heresy-me at hotmail dot com Target Milestone: --- There are many occasion that to do some compile-time check if we need. For example, I write my own sqrt function that it may check its parameter should greater than or equal to zero at compile-time when it is compile-time evaluated. such as: function mysqrt(r) real :: mysqrt $!assert static(r >= 0.0, "radicand is negative.") real, intent(in) :: r end function just normally likes the compiler behavior. it also may specify like "!$assert dynamic", "!$assert static_dynamic" So I need not to fix the obivous compile-time until the program debug. Just because I know that the C/C++ compiler has been added a standard static_assert or _Static_assert keyword to finish this work, the Ada language also can specify the function precondition, then why fortran can't? C/C++: float mysqrt(float r) { static_assert(r >= 0.0, "radicand is negative."); /* ... */ } Ada: function mysqrt(r : Float) return Float with Precondition => (r >= 0.0);
[Bug fortran/71592] Add some facilities for compile-time check
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71592 --- Comment #2 from 鍾 --- (In reply to Jakub Jelinek from comment #1) > You can't use such static_assert this way in C++, unless the function is > constexpr, nor in C (always), so guess you are proposing something > completely different (like, if this function/subroutine is inlined and the > expression is after inlining/optimizations constant, then see if it is true > or false, otherwise do nothing. So more like > if (__builtin_constant_p (r >= 0.0)) > { > if (!(r >= 0.0)) __builtin_warning ("..."); > } > Also, !$ already has a specific meaning in OpenMP, so it would be a bad idea > to abuse it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39462 Please read this bug-report page. static assert is now part of C11 standard. And can be used in 4.7 and above with _Static_assert keyword. Actually, This kind of "static check" need not to alter any function/subroutine body. It added and used by the consumer of functions/subroutine. no relate to inlining and optimization anything. It signed as "$!" on the function declaration or function implementation(so it don't reserved on real execution code, works only on current compilation unit if the compiler recognize this directive). "$!" is not only used by OpenMP($!omp), but also used by OpenACC($!openacc), and used to import or export the dll function on ivf($!DEV DLLIMPORT or $!DEV DLLEXPORT), etc.
[Bug fortran/71592] Add some facilities for compile-time check
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71592 鍾 changed: What|Removed |Added Resolution|WONTFIX |FIXED --- Comment #5 from 鍾 --- full_assertion_declaration ::= assertion_directive assertion_declaration assertion_directive ::= *$assertion|c$assertion|!$assertion assertion_declaration ::= assertion_body{,assertion_body} assertion_body ::= static_assertion|dynamic_assertion static_assertion ::= static(compile_time_boolean_expression,[failure_message]) dynamic_assertion ::= dynamic(execution_time_boolean_expression,[failure_message]) failure_message ::= static_fortran_string the static assertion directives of procedure is not only work on current compilation unit, but also work on any module(possibly). a procedure contain static assertion directive of a module, its assertion can contained by the modules' mod file. So any procedures use this module procedure will be checked the assertions by the compiler on compile-time(not on execution-time). the dynamic assertion isn't like the simple preprocess assertion. dynamic assertion will generate some check code, but the check code is not expanded on the body of procedures. it can be a independent code fraction, or inlined to the procedure consumer, but never alter the execution code of called procedure. Then, the assertion can added freely for the function when declaration or implementation.
[Bug fortran/71764] New: compiler internal error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71764 Bug ID: 71764 Summary: compiler internal error: segmentation fault Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: heresy-me at hotmail dot com Target Milestone: --- Created attachment 38832 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38832&action=edit libfsqlite-full I am wrapping the libsqlite3-dev for Fortran. gfortran fsqlite_runtime.f08 -o fsqlite_runtime.o -fopenmp -Warray-bounds -Wall -Wextra -fno-strict-aliasing -fwrapv -g -std=f2008ts -c fsqlite_runtime.f08:103:0: c_err = sqlite3_exec_ex(db, sqls, to_cb, to_dat, c_null_ptr) 1 编译器内部错误: Segmentation fault 请提交一份完整的错误报告, 如有可能请附上经预处理后的源文件。 参阅 <http://gcc.gnu.org/bugs.html> 以获取指示。 make: *** [Makefile:56:fsqlite_runtime.o] 错误 1 fsqlite_runtime.f08:129:0: c_err = sqlite3_prepare_ex(db, sql, c_strlen(c_loc(sql)), stmt, c_null_ptr) 1 编译器内部错误: Segmentation fault 请提交一份完整的错误报告, 如有可能请附上经预处理后的源文件。 参阅 <http://gcc.gnu.org/bugs.html> 以获取指示。 make: *** [Makefile:56:fsqlite_runtime.o] 错误 1 If I place the relevant code to a single file and compile it, it will be successlly compiled.
[Bug fortran/71764] compiler internal error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71764 --- Comment #1 from 鍾 --- $ uname -a CYGWIN_NT-6.1 LLVM 2.5.2(0.297/5/3) 2016-06-23 14:29 x86_64 Cygwin $ gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe 目标:x86_64-pc-cygwin 配置为:/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible 线程模型:posix gcc 版本 5.4.0 (GCC)
[Bug ada/71911] New: [Cygwin] "gnatclean program" will remove the standard package .ali file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71911 Bug ID: 71911 Summary: [Cygwin] "gnatclean program" will remove the standard package .ali file Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: heresy-me at hotmail dot com Target Milestone: --- with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line ("Hello world!"); end Hello; $ gnatmake hello gcc -c hello.adb gnatbind -x hello.ali gnatlink hello.ali $ gnatclean hello "./hello.ali" has been deleted "./hello.o" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/ada.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-textio.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-except.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-stream.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-tags.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/interfac.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/i-cstrea.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/system.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-crtl.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-fileio.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-secsta.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-stoele.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-wchcnv.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-wchcon.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-ioexce.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-ficobl.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-soflin.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-unstyp.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-elchha.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-exctab.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-except.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-excmac.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-excdeb.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-imgint.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-stalib.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-traceb.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-wchstw.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-parame.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-traent.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-htable.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-valllu.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/a-finali.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/i-c.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-casuti.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-os_lib.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-wchjis.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-stache.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-memory.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-strhas.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-valuti.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-finroo.ali" has been deleted "/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/adalib/s-string.ali" has been deleted "hello.exe" has been deleted $ gnatclean --version GNATCLEAN 5.4.0 Copyright (C) 2003-2015, Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -a CYGWIN_NT-6.1 LLVM 2.5.2(0.297/5/3) 2016-06-23 14:29 x86_64 Cygwin But this situation look like not in MinGW platform. MinGW is updated to GCC 4.9 now.
[Bug ada/71911] [Cygwin] "gnatclean program" will remove the standard package .ali file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71911 --- Comment #2 from 鍾 --- (In reply to Eric Botcazou from comment #1) > How was the compiler configured? Which permissions have the ALI files? 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe 目标:x86_64-pc-cygwin 配置为:/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible 线程模型:posix gcc 版本 5.4.0 (GCC) I use the administrator user and administrator permissions in Windows host, so, normally I use the same permission map to root permissions in Cygwin host.