: normal
Priority: P3
Component: pch
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
Host: x86_64-w64-mingw32
Target: x86_64-w64-mingw32
Build: x86_64-w64-mingw32
An
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
Compile:
g++ -O2 a.cpp
./a.out
Current output:
1 610334368
Segmentation fault (core dumped)
Code:
#include
struct T {
int val
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
Program:
```
#include
int main(){
for(auto it:{1, 2}){
}
}
```
Compiler flag: `-fconcepts -std=c++11
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95769
--- Comment #2 from John Simon ---
(In reply to Jakub Jelinek from comment #1)
> If you want to ensure a function is evaluated at compile time, it needs to
> be either C++20 consteval, or you need to evaluate it in constant expression
> context,
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
Godbolt link: https://godbolt.org/z/Kimna8
Code:
```
int constexpr expensive_function(int x){
int result{};
while(x!=1){
x=x%2!=0 ? x*3+1
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
```
[]$ /bin/g++ -v
Using built-in specs.
COLLECT_GCC=/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93070
John Simon changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93071
--- Comment #1 from John Simon ---
*** Bug 93070 has been marked as a duplicate of this bug. ***
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
On Godbolt, the following code:
```
#include
int f(int x){
return std::__lg(x);
}
int g(int x){
return 31-__builtin_clz(x
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
On Godbolt, the following code:
```
#include
int f(int x){
return std::__lg(x);
}
int g(int x){
return 31-__builtin_clz(x
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
Version:
```
$ gcc --version
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92220
--- Comment #3 from John Simon ---
(In reply to Andrew Pinski from comment #1)
> No i think there is one case where what you said is incorrect. When both are
> INT_MIN.
In this case the result will be 0.
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
```
[]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
```
[]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux
ty: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
#include
int main()
{
std::cout << "Hello, World!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60892
John Simon changed:
What|Removed |Added
CC||gcc at mailinator dot com
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85922
--- Comment #4 from John Simon ---
> No, it uses a correct instruction, but you have too old assembler that can't
> handle it.
I think in this case the "correct" thing to do would be a check of assembler
during configure and either:
1) only gen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85922
John Simon changed:
What|Removed |Added
Resolution|WONTFIX |FIXED
--- Comment #2 from John Simon ---
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921
--- Comment #8 from John Simon ---
https://gcc.gnu.org/install/ doesn't say anything about make headers_install.
How/Where to do this?
If this is appropriate then it is much better than manually patching anything.
In this case I'd still suggest
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921
--- Comment #6 from John Simon ---
> I doubt this warrants a change on GCC side, given that a workaround is simple.
If I understood it correctly the local "solution" would be to fix a system
header (which is often not possible because of missing
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
On bootstrapping after implementing an hack for #85921 (environment and options
used specified there
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921
--- Comment #3 from John Simon ---
The include chain is:
# 415 "../../gcc-8.1.0/gcc/system.h"
<-- "/usr/include/signal.h"
<-- "/usr/include/bits/sigcontext.h"
<-- "/usr/include/asm/sigcontext.h"
<-- "/usr/include/linux/compi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85921
--- Comment #2 from John Simon ---
> Can you figure out who #defines noinline?
Sure. Using -E -dD pointed to "/usr/include/linux/compiler.h" which has:
```c
/*
* From the GCC manual:
*
* Many functions do not examine any values except their
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
uname -a:
Linux MACHINE 2.6.16.60-0.85.1-bigsmp #1 SMP Thu Mar 17 11:45:06 UTC 2011 i686
i686 i386 GNU/Linux
gcc --version:
gcc (GCC) 4.1.2 20070115 (SUSE Linux)
steps done
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79318
--- Comment #1 from John Simon ---
Full example:
#include
using namespace std;
class Foo
{
private:
int a;
public:
Foo():a(0){};
&operator int() {return a;}; // this fails with Clang
};
int main()
{
Foo foo;
int x
rmal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at mailinator dot com
Target Milestone: ---
See example and discussion on
https://stackoverflow.com/questions/41954449/what-does-gccs-conversion-function-operator-in
--- Comment #8 from gcc at mailinator dot com 2007-01-16 07:24 ---
The original poster might want to read http://c-faq.com/misc/intovf.html and
http://c-faq.com/misc/sd26.html to see how he might "prevent people from
getting hacked" correctly.
--
http://gcc.gnu.or
--- Additional Comments From gcc at mailinator dot com 2005-06-06 12:57
---
Same problem in 3.4.4
--
What|Removed |Added
Version|3.4.3
dot gnu dot org
ReportedBy: gcc at mailinator dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux
GCC host triplet: i686-pc-linux
GCC target triplet: h8300-hitachi-hms
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21530
29 matches
Mail list logo