From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26136 invoked by alias); 3 May 2014 00:15:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26082 invoked by uid 48); 3 May 2014 00:15:28 -0000 From: "hstong at ca dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/61041] New: Cannot create std::tr1::variate_generator from variate_generator::engine(); engine_value_type error Date: Sat, 03 May 2014 00:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hstong at ca dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00109.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61041 Bug ID: 61041 Summary: Cannot create std::tr1::variate_generator from variate_generator::engine(); engine_value_type error Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hstong at ca dot ibm.com http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.tr1 s= hows that support for ISO/IEC DTR 19768 subclause 5.1.3 is available in libstdc+= +. It seems that engine_value_type in libstdc++ is not defined such that it matches 5.1.3 paragraph 2 (assuming the DTR is close enough to the TR): The template argument for the parameter Engine shall be of the form U, U&, = or U*, where U denotes a class that satisfies all the requirements of a uniform random number generator. The member engine_value_type shall name U. The following small client for generates error messages showing that the engine_value_type typedef is some specialization of std::tr1::__detail::_Adaptor and not the corresponding "U" for U& =3D ::EngineType. ### SOURCE:> cat engine_value_type.cc #include typedef std::tr1::linear_congruential &EngineType; typedef std::tr1::uniform_int DistType; std::tr1::variate_generator getWithNewDist(std::tr1::variate_generator &orig, const DistType &newDist) { return std::tr1::variate_generator(orig.engine(), newDist); } ### COMPILER INVOCATION AND OUTPUT:> g++ engine_value_type.cc engine_value_type.cc: In function =E2=80=98std::tr1::variate_generator&, std::tr1::uniform_int > getWithNewDist(std::tr1::variate_generator&, std::tr1::uniform_int >&, const DistType&)=E2=80=99: engine_value_type.cc:8:83: error: no matching function for call to =E2=80=98std::tr1::variate_generator&, std::tr1::uniform_int >::variate_generator(std::tr1::variate_generator&, std::tr1::uniform_int >::engine_value_type&, const DistType&)=E2=80=99 return std::tr1::variate_generator(orig.engine(), newDist); =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ engine_value_type.cc:8:83: note: candidates are: In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/random:47:0, from engine_value_type.cc:1: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/random.h:252:7: note: std::tr1::variate_generator<_Engine, _Dist>::variate_generator(std::tr1::variate_generator<_Engine, _Dist>::engine_type, std::tr1::variate_generator<_Engine, _Dist>::distribution_type) [with _Engine =3D std::tr1::linear_congruential&; _Dist =3D std::tr1::uniform_int; std::tr1::variate_generator<_Engine, _Dist>::engine_type =3D std::tr1::linear_congruential&; std::tr1::variate_generator<_Engine, _Dist>::distribution_type =3D std::tr1::uniform_int] variate_generator(engine_type __eng, distribution_type __dist) ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/random.h:252:7: note: = no known conversion for argument 1 from =E2=80=98std::tr1::variate_generator&, std::tr1::uniform_int >::engine_value_type {aka std::tr1::__detail::_Adaptor&, std::tr1::uniform_int >}=E2=80=99 to =E2=80=98std::tr1::variate_generator&, std::tr1::uniform_int >::engine_type {aka std::tr1::linear_congruential&}=E2=80=99 /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/random.h:228:11: note: std::tr1::variate_generator&, std::tr1::uniform_int >::variate_generator(const std::tr1::variate_generator&, std::tr1::uniform_int >&) class variate_generator ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/tr1/random.h:228:11: note:= =20=20 candidate expects 1 argument, 2 provided ### VERSION INFO:> g++ --version g++ (GCC) 4.8.2 Copyright (C) 2013 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. >>From gcc-bugs-return-450418-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 03 01:00:35 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 31297 invoked by alias); 3 May 2014 01:00:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 31259 invoked by uid 48); 3 May 2014 01:00:31 -0000 From: "su at cs dot ucdavis.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61042] New: ICE on valid code at -O3 on x86_64-linux-gnu Date: Sat, 03 May 2014 01:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: su at cs dot ucdavis.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00110.txt.bz2 Content-length: 2178 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61042 Bug ID: 61042 Summary: ICE on valid code at -O3 on x86_64-linux-gnu Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu The following code causes an ICE when compiled with the current gcc trunk at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.=20 It is a regression from 4.9.x.=20 $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux= -gnu/4.10.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --prefix=3D/usr/local/gcc-trunk --enable-languages=3Dc,c++ --disable-werror --enable-multilib Thread model: posix gcc version 4.10.0 20140502 (experimental) [trunk revision 210000] (GCC)=20 $=20 $ gcc-trunk -O2 -c small.c $ gcc-4.9 -O3 -c small.c $=20 $ gcc-trunk -O3 -c small.c small.c: In function =E2=80=98foo=E2=80=99: small.c:4:1: internal compiler error: Segmentation fault foo () ^ 0x95c21f crash_signal ../../gcc-trunk/gcc/toplev.c:337 0x9b07d5 bb_predicate ../../gcc-trunk/gcc/tree-if-conv.c:149 0x9b07d5 is_predicated ../../gcc-trunk/gcc/tree-if-conv.c:275 0x9b07d5 is_cond_scalar_reduction ../../gcc-trunk/gcc/tree-if-conv.c:1442 0x9b07d5 predicate_scalar_phi ../../gcc-trunk/gcc/tree-if-conv.c:1583 0x9b07d5 predicate_all_scalar_phis ../../gcc-trunk/gcc/tree-if-conv.c:1637 0x9b07d5 combine_blocks ../../gcc-trunk/gcc/tree-if-conv.c:1954 0x9b178e tree_if_conversion ../../gcc-trunk/gcc/tree-if-conv.c:2108 0x9b178e execute ../../gcc-trunk/gcc/tree-if-conv.c:2187 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $=20 -------------------------- int a, b, c[1], d, f; void foo () { for (; b; b++) c[0] =3D c[f] && (d =3D a); } >>From gcc-bugs-return-450419-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 03 01:19:24 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5986 invoked by alias); 3 May 2014 01:19:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 5924 invoked by uid 55); 3 May 2014 01:19:17 -0000 From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61002] Can't divide by 0 Date: Sat, 03 May 2014 01:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00111.txt.bz2 Content-length: 1017 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61002 --- Comment #8 from Steve Kargl --- On Fri, May 02, 2014 at 02:24:40PM +0000, dominiq at lps dot ens.fr wrote: > > What is the best way to avoid the misleading "This check can be disabled with > the option -fno-range-check" for integers? Use "This check can be disabled for > floating point values with the option -fno-range-check"? or pass an extra > argument to gfc_arith_error? > > While I am at it, should I do the same thing for "Arithmetic overflow" and > friends? Should not "This check can be disabled with the option > -fno-range-check" ends with a dot? Traditional error messages did not end with punctuation. When error messages started to be more than a sentence, we needed to punctuate the first sentence(s), and the last sentence was left unpunctuated. Instead of "This check ... ". Simply use "See -fno-range-check". Then gfortran.info can add a lengthy description about what -fno-range-check does.